📌 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.

📋 1. What We Need to Install

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
1 PART 1 — Install JDK on Windows
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:
java -version

You should see output similar to:

java version "21.0.x" 2026-x-x LTS
  • Then verify the Java compiler:
javac -version

Example output:

javac 21.0.x

If both commands return the version without errors, Java is successfully installed!

2 PART 2 — Configure JAVA_HOME Environment Variable

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:
%JAVA_HOME%\bin
  • Open a new Command Prompt window and verify:
echo %JAVA_HOME%
java -version
3 PART 3 — VS Code Setup for Java
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
4 PART 4 — Create First Java Project in VS Code
  • Create a folder on your drive: D:\AdvancedJava
  • Open VS Code and choose File → Open Folder, then select D:\AdvancedJava
  • Press Ctrl + Shift + P to 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.
5 PART 5 — Maven Project Structure

A standard Maven directory layout follows strict convention, which is essential for Advanced Java and web projects:

AdvancedJava │ ├── pom.xml │ └── src ├── main │ ├── java │ └── resources │ └── test └── java
6 PART 6 — Create First Java Program in VS Code

Create a file at path: src/main/java/com/teluguittutorials/App.java

package com.teluguittutorials; public class App { public static void main(String[] args) { System.out.println("Welcome to Advanced Java"); } }

Click the Run button above main() method in VS Code.

Output:

Welcome to Advanced Java
7 PART 7 — Configure Maven Project (pom.xml)

Your initial pom.xml file specifies project metadata and JDK compiler version settings:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.teluguittutorials</groupId> <artifactId>advanced-java</artifactId> <version>1.0-SNAPSHOT</version> <properties> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> </properties> </project>
Note: If you are using JDK 21, simply change the compiler source and target properties to 21:
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
8 PART 8 — Install Eclipse IDE
  • 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.
9 PART 9 — Verify Java Configuration in Eclipse

Ensure Eclipse is linked to your system JDK installation:

Window → Preferences → Java → Installed JREs
  • 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.
10 PART 10 — Create Java Project in Eclipse
File → New → Java Project
  • Project name: AdvancedJava
  • Select your JDK version under JRE options.
  • Click Finish.
11 PART 11 — Create Package in Eclipse
  • Right-click the src folder in Package Explorer.
  • Select New → Package.
  • Name: com.teluguittutorials
  • Click Finish.
12 PART 12 — Create Java Class & Run in Eclipse
  • Right-click package com.teluguittutorials → New → Class.
  • Name: App
  • Check: public static void main(String[] args)
  • Click Finish.

Add program logic:

package com.teluguittutorials; public class App { public static void main(String[] args) { System.out.println("Welcome to Advanced Java"); } }

Right-click App.java → Run As → Java Application.

Console Output:

Welcome to Advanced Java
13 PART 13 — Install Standalone Maven

First, check if Maven command-line tool is already installed:

mvn -version

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:
mvn -version
14 PART 14 — Install Apache Tomcat

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:

D:\Servers\apache-tomcat
🚀
Advanced Java Environment Ready!
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!