How to Install Java (JDK 25) on Windows 11 & 10
LTS 2025
📑 Jump to Section
🔧 What Is the Java JDK?
The JDK (Java Development Kit) is essential for Java developers. It bundles the compiler, runtime, and core libraries. For beginners, always choose the JDK (it includes JRE + JVM automatically).
- JDK → write, compile, debug.
- JRE → only to run existing programs.
- JVM → heart of Java execution.
Get the official Oracle JDK 25 LTS installer for Windows.
- Visit Oracle JDK Downloads
- Select Java 25 (LTS).
- Under Windows tab, click the
.exeinstaller (e.g.,jdk-25_windows-x64_bin.exe).
- Double-click the downloaded
.exefile. - Click Next on the welcome screen.
- Leave default installation path:
C:\Program Files\Java\jdk-25→ click Next. - Wait for installation (usually under 1 minute).
- Click Close to finish.
Properly configuring JAVA_HOME and PATH ensures Java works from anywhere in Command Prompt.
🔹 Set JAVA_HOME
- Press Windows + S, type “Environment Variables” → select Edit the system environment variables.
- In System Properties → click Environment Variables.
- Under System variables, click New.
- Variable name:
JAVA_HOME
Variable value:C:\Program Files\Java\jdk-25 - Click OK.
🔹 Update PATH Variable
- In the same System variables, find and double-click Path.
- Click New and add:
%JAVA_HOME%\bin - Click OK on all windows. Restart Command Prompt if it was open.
java and javac globally.Open a fresh Command Prompt (Win + R → cmd) and run these commands:
java -version
Java(TM) SE Runtime Environment (build 25+5-LTS)
Java HotSpot(TM) 64-Bit Server VM (build 25+5-LTS, mixed mode, sharing)
javac -version
Let’s write the classic “Hello, World!” to ensure full functionality.
- Open Notepad (or VS Code).
- Copy this code:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World! Java 25 is ready.");
}
}
- Save as
HelloWorld.javaon your Desktop. - Open Command Prompt, navigate to Desktop:
cd %USERPROFILE%\Desktop
- Compile:
javac HelloWorld.java
- Run:
java HelloWorld
🛠️ Troubleshooting Common Issues
➜ You missed Step 3. Double-check
JAVA_HOME and %JAVA_HOME%\bin in PATH. Then restart Command Prompt.➜ You installed JRE only, not JDK. Download the correct JDK 25 .exe from Oracle.
➜ Uninstall old Java versions via Control Panel → Programs and Features, then reinstall JDK 25 and verify JAVA_HOME path.
📖 What to Learn Next
Your Java environment is fully ready. Now dive into core concepts: variables, loops, OOP, collections, and exception handling. Java powers Android, enterprise systems, and cloud platforms — and remains one of the highest-paid skills.
🎯 Final Word
You’ve successfully installed JDK 25 LTS on Windows 11 or 10, set environment variables, verified your toolchain, and executed your first Java program. The full Java ecosystem is now at your fingertips.
Tested on: Windows 11 (24H2) and Windows 10 (22H2) with JDK 25 September 2025 LTS release. This setup works flawlessly for development, education, and professional usage.







