How to Set Up Java Development Tools on Windows 11 (Beginner's Guide)
Learn to set up Java on Windows 11! Beginner-friendly guide to installing JDK, setting env variables, & running your first program. Start coding Java today!

Introduction:
Are you eager to start exploring the exciting world of Java programming? That's fantastic! Web apps and mobile apps alike are powered by Java, a powerful programming language. You must first set up your development environment before you can begin writing your first "Hello, World!" application. Don't worry, though; it's much easier than it looks, especially on Windows 11. The setup process will be explained in detail in this article, making it easy for even the most inexperienced coder to follow along.
Why Opt for Java?
Java is a versatile and potent programming language that can be used for a variety of purposes, ranging from enterprise software to Android mobile apps. You can access a vast array of programming possibilities by setting your Java development tools on Windows 11.
What You'll Need:
-
A Computer Running Windows 11: This is a must!
-
Internet access: To download the necessary software.
-
A Little Patience: It could take some time to set up your programming environment.
Setting up Java development tools on Windows 11
Let's begin!
Step 1: Setting up the JDK (Java Development Kit)
The foundation of Java development is the JDK. It includes the tools you need to compile and debug your code, as well as the Java Runtime Environment (JRE), which lets you run Java applications.
Download the JDK:
-
Go to a trustworthy OpenJDK distribution such as Adoptium (Eclipse Temurin) or the official Oracle website. Adoptium is commonly suggested for novices because of its open-source nature and user-friendly interface.
-
Look for the most recent Long-Term Support (LTS) version, as these are stable and have long-term support.
-
Start by choosing the installer for Windows x64.
-
Get the Microsoft Installer file, .msi file.
Run the Installer:
-
Double-click the downloaded.msi file to launch the installer.
-
Usually accepting the default options, follow the on-screen instructions.
-
Note the installation path (C:\Program Files\Eclipse Adoptium\jdk-17.0.x+y) because you will need it later.
-
Click Finish after the installation is complete.
Setting Up Environment Factors
System variables need to be set up for Java to execute from any command prompt.
-
Find the path to the JDK installation:
-
Use File Explorer to locate the installation directory if you didn't already record it.
-
Create the variable JAVA_HOME:
-
In the Windows search box, type "environment variables" and choose "Edit the system environment variables."
-
To edit the system environment variables, click Edit.
-
Choose Environment Variables under the Advanced tab.
-
Find Path in the System variables section, then select Edit.
-
After selecting New, provide the location to the JDK bin (for example, C:\Program Files\Java\jdk-XX\bin).
-
To save your modifications, click OK.
Step 2: Installing an Integrated Development Environment (IDE)
By integrating a text editor, debugger, and compiler into a single program, an IDE makes coding easier. Several well-known Java IDEs are:
- Eclipse:
-
Go to eclipse.org to get it.
-
To begin, choose the Eclipse IDE designed specifically for Java developers.
-
After running the installer, follow the setup instructions.
- IntelliJ IDEA.
-
To get it, go to jetbrains.com.
-
Install the program and choose the free Community Edition.
-
Adhere to the installation instructions provided.
- Visual Studio Code (VS Code).
-
It is available for download at code.visualstudio.com.
-
Installing the Java Extension Pack from the VS Code marketplace is essential.
Step 3: Verifying Your Setup
Let's make sure everything is operating as it should.
-
Open Command Prompt:
Open Command Prompt by typing "cmd" into the Windows search box. -
Verify the version of Java you are using.
Press Enter after entering the following command:
java –version
If installed correctly, you should see the output like:
java version "XX.X.X" Java(TM) SE Runtime Environment (build XX.X.X)
Congratulations if the version details show up! The JDK has been successfully installed.
Step 4: Write Your First Java Program and Run It
-
Open the IDE
To begin a new Java project, use Eclipse, IntelliJ IDEA, or Visual Studio Code. -
Compose Your First Java Program
Make a new Java file and enter the code below:
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }
- Run the program.
Click Run in your IDE or Use the terminal with the following command:
javac HelloWorld.java java HelloWorld
The message "Hello, World!" ought should appear on your screen.
Conclusion
Excellent work! You have successfully configured your Windows 11 Java development environment. You are now prepared to start creating projects and coding in Java. Please feel free to forward this information to others who are just beginning their Java adventure if you find it helpful!