2.6 KiB
2.6 KiB
| sidebar_position | title |
|---|---|
| 6 | IDE Configuration |
IDE Configuration
Step 10 — Install and Configure NetBeans 17
10.1 — Install NetBeans
- Download NetBeans 17 from:
- Run the installer and complete the installation with default settings.
10.2 — Register JDK 8
NetBeans may detect a newer JDK if you have one installed. Ensure it is using JDK 8 for this project.
- Open NetBeans → Tools → Java Platforms.
- Check that JDK 1.8 is listed. If not, click Add Platform, select Java Standard Edition, and navigate to your JDK 8 installation directory (your
JAVA_HOMEpath). - Click Finish, then Close.
10.3 — Register Tomcat 9
- Go to Tools → Servers → Add Server.
- Select Apache Tomcat or TomEE and click Next.
- Set the Server Location to your Tomcat 9 directory (e.g.,
C:\dev\tomcat9). - Set a username and password for the Tomcat manager (you can use any values for local development, e.g.,
admin/admin). - Click Finish.
10.4 — Configure Maven in NetBeans
- Go to Tools → Options → Java → Maven.
- Under Maven Home, click Browse and point it to your Maven installation directory (
C:\dev\maven). Do not use the "Bundled" option. - Click OK.
10.5 — Open the Project
- Go to File → Open Project.
- Navigate to your cloned
stockfolder and select it. NetBeans will recognize it as a Maven project. - Click Open Project.
Step 11 — Build and Verify
This final step confirms that your entire environment is wired up correctly.
11.1 — Build the Project
- In NetBeans, right-click the Stock project in the Projects panel.
- Select Clean and Build.
- Monitor the Output panel at the bottom. The build must end with:
BUILD SUCCESS
If you see BUILD FAILURE with dependency errors, revisit Step 3 (Maven settings.xml and Gitea registry).
11.2 — Deploy and Run
- Right-click the project → Run.
- NetBeans will deploy the application to your local Tomcat 9 instance and open it in the browser.
- The application should load without any database connection errors.
11.3 — Verify Database Connectivity
- Log in to the application using the test credentials (ask your team lead for the default test user).
- Navigate to any section that loads data from the database (e.g., the stock listing page).
- If data loads correctly, your environment is fully operational.