📌 Comprehensive Advanced Java Environment Setup
Setting up a complete Java development environment on Windows is essential for developing enterprise applications, web services with Servlets/JSP, REST APIs, and database-driven solutions.
For Advanced Java, we recommend installing the following software suite:
| Software | Purpose |
|---|---|
| JDK 17 or 21 | Java Development Kit (JDK 17 or 21 LTS is recommended for learning & production) |
| VS Code | Lightweight code editor for Java development |
| Eclipse IDE | Full-featured Java IDE for Enterprise & Web Developers |
| Apache Tomcat | Web application server for Servlets, JSP & REST APIs |
| MySQL | Relational Database Management System (RDBMS) |
| MySQL Workbench | Graphical GUI client for database management |
| Git | Version control system |
| Maven | Dependency & build management tool |
Step 1: Download JDK
You can use either Eclipse Temurin JDK (Adoptium) or Oracle JDK. For a course or enterprise learning environment, Eclipse Temurin JDK 17/21 is a convenient choice.
- Download the Windows
x64 Installer (.msi or .exe). - During installation, preferably enable:
- Set JAVA_HOME
- Add to PATH
Step 2: Verify Java
- Open Command Prompt (
cmd) and execute:
You should see output similar to:
- Then verify the Java compiler:
Example output:
If both commands return the version without errors, Java is successfully installed!
Configuring JAVA_HOME is critical because tools like Maven, Tomcat, Spring Boot CLI, and Gradle rely on this environment variable to locate the JDK installation directory.
- Search Windows Start menu for: Environment Variables
- Select: Edit the system environment variables
- Click Environment Variables... → Under System Variables, click New
- Set the variable details:
Variable name: JAVA_HOME
Variable value: C:\Program Files\Eclipse Adoptium\jdk-21.x.x-hotspot - Next, select the Path variable under System Variables and click Edit.
- Click New and add:
- Open a new Command Prompt window and verify:
Step 1: Install VS Code
Download and install Visual Studio Code from code.visualstudio.com and open VS Code after installation.
Step 2: Install Java Extension Pack
- In VS Code, go to Extensions tab (or press
Ctrl + Shift + X). - Search for: Extension Pack for Java (by Microsoft).
- Click Install. This pack installs 6 essential extensions:
- Language Support for Javaâ„¢ by Red Hat
- Debugger for Java
- Maven for Java
- Test Runner for Java
- Project Manager for Java
- IntelliCode
- Create a folder on your drive:
D:\AdvancedJava - Open VS Code and choose File → Open Folder, then select
D:\AdvancedJava - Press
Ctrl + Shift + Pto open the Command Palette. - Search for and select: Java: Create Java Project.
- Choose project build type: Select Maven (recommended for Advanced Java) or No build tools.
A standard Maven directory layout follows strict convention, which is essential for Advanced Java and web projects:
Create a file at path: src/main/java/com/teluguittutorials/App.java
Click the Run button above main() method in VS Code.
Output:
Your initial pom.xml file specifies project metadata and JDK compiler version settings:
21:
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
- Download: Eclipse IDE for Enterprise Java and Web Developers from eclipse.org.
- This edition is preferable for Advanced Java because it comes pre-packaged with Servlet, JSP, JSF, Web Tools Platform (WTP), and XML tools.
- Run installer and launch Eclipse on Windows.
- When prompted for a Workspace directory, enter:
D:\AdvancedJavaWorkspace - Click Launch.
Ensure Eclipse is linked to your system JDK installation:
- Verify your installed JDK (e.g. JDK 21) is listed.
- If it is not available, click Add... → Standard VM → Next.
- Browse and select your JDK installation folder:
C:\Program Files\Eclipse Adoptium\jdk-21.x.x-hotspot - Check the checkbox next to the JDK to set it as default.
- Project name:
AdvancedJava - Select your JDK version under JRE options.
- Click Finish.
- Right-click the
srcfolder in Package Explorer. - Select New → Package.
- Name:
com.teluguittutorials - Click Finish.
- Right-click package
com.teluguittutorials→ New → Class. - Name:
App - Check:
public static void main(String[] args) - Click Finish.
Add program logic:
Right-click App.java → Run As → Java Application.
Console Output:
First, check if Maven command-line tool is already installed:
If you see 'mvn' is not recognized as an internal or external command, install Apache Maven:
- Download Apache Maven binary zip from maven.apache.org.
- Extract it to a folder such as:
C:\apache-maven - Create System Variable:
Variable name: MAVEN_HOME
Variable value: C:\apache-maven\apache-maven-3.x.x - Edit Path System Variable and add:
%MAVEN_HOME%\bin - Verify in a new Command Prompt:
For Advanced Java web development, Apache Tomcat is essential for learning and hosting:
- Servlets
- JSP (JavaServer Pages) & JSTL
- MVC Architecture
- Filters & Listeners
- Session Management & Cookies
- RESTful Web APIs
Download Apache Tomcat (zip/installer) from tomcat.apache.org and extract it to:
You have successfully configured JDK 17/21, JAVA_HOME, VS Code, Eclipse IDE, Maven, and Tomcat. You are ready to start building Advanced Java web and enterprise applications!