- Java JDK is a must for programming and running Java applications on Windows.
- It is vital to differentiate between JDK (includes development tools) and JRE (execution only).
- Correctly setting the PATH variable allows you to use Java from any location.
If you've made it this far, you're probably interested in Learn how to install Java (JDK) on Windows from scratch. Whether because you want to start in the programming, you need to run a specific Java application, or you've simply come across the need for a suitable development environment. You've come to the right place: here we'll tell you in a detailed and simple way how to download, install and correctly configure the Java JDK on your Windows computer, without skipping any important steps, whether you're using Windows version 10, 11, or higher.
Let's clear up all doubts: what to download, where from, how to install it and how to get it ready to work both online and commands like in your favorite editorWe'll also explain why it's so important to differentiate between the JRE and the JDK, what the famous PATH environment variable is, and what common problems you might encounter during the process.
What is the JDK and why do you need to install it?

The first thing you should know is that Java is one of the most popular and powerful programming languages, used in millions of devices and applications. In order to develop and run Java programs on your computer, you need to have the JDK (Java Development Kit)This kit includes essential tools such as the compiler, the interpreter, the scrubber and Java virtual machine (JVM)That is, everything you need to both create and test your own programs.
The JDK is often confused with the JRE (Java Runtime Environment), which is just the runtime environment, intended for those who want to use apps in Java but not programming. The JDK is the full version, with all development tools that a programmer needs, so if you intend to start programming in Java, this is the version you should install.
How to check if you already have Java installed on Windows
Before starting the installation, it's a good idea to check if you already have a version of Java on your computer. Your computer may have an older version, but it may not be configured correctly or may not include the full JDK. To check:
- Open the symbol of the system (you can search for “cmd” in the start menu).
- Write java -version and press Enter. If you see information about an installed version, it means you have the JRE or even the JDK. If you get an error message, you probably don't have anything installed or it's not configured correctly.
- To make sure, run javac-version or simply JavacIf you see an error indicating that the command is not recognized, it is likely that the compiler (present only in the JDK) not availableIf the version appears, you already have the JDK ready to use.
JDK Download: Versions and Alternatives
Nowadays there are different Java distributions, the best known being Oracle infrastructures and of OpenJDK, the open source alternative. In both cases, the procedure is similar, and for personal use and learning, you can choose the one you prefer. Let's focus on the most common. for starters: Download the JDK from the official Oracle website.
- Visit official Java download page.
- Look for the section for “Java SE Development Kit” (the latest version is usually prominently displayed).
- Choose the appropriate package for your operating system – usually “Windows x64 Installer” if you have modern 64-bit Windows.
- Please accept the Oracle license terms before downloading.
- Save the file to a folder of your choice: this is usually an .exe (installer) file, or you can also download a compressed (.zip) file if you prefer to install it manually, although for most users the installer is the easiest.
Step-by-step installation of the JDK on Windows
Once you've downloaded the JDK file, it's time to install it on your Windows computer. The installation wizard will guide you through the installation process, but here's a breakdown of what you can expect:
- Run the installer by double-clicking on the downloaded file (usually called something like jdk-xx_windows-x64_bin.exe).
- A User Account Control prompt may appear, requesting permission to make changes to the device. Confirm the request.
- The wizard will open showing a welcome screen: click on Next to continue.
- You will choose the installation location (by default it is usually “C:\Program Files\Java\jdk…” and it is usually the best option to avoid complications).
- A screen will appear for selecting components. Normally, you don't need to change anything: leave everything selected by default (usually including Development Tools, Source Code, and Public JRE) checked.
- The installer will automatically extract and copy the files. In some cases, it may ask you to specify the folder where the JRE (Java Runtime Environment, included in the JDK) will go. If so, leave the suggested path or change it only if you know what you're doing.
- Once finished, you'll see a screen indicating that the installation was successful. The installer may now show you some additional resources (tutorials, documentation, etc.). You're done. Java JDK installed on your Windows.
Setting Environment Variables in Windows
Even though the JDK is already installed, Windows won't know where to find your applications unless you add it to the environment variable PATH. This step is essential to be able to execute commands such as Javac o Java from any command window. To learn more about environment management in Windows, you can consult How to manage environment variables in Windows and other systems.
- Right click on the button Home Windows and choose “System”.
- In the window that opens, find "Advanced System Settings" or "System Properties" and click on it. Then, go to the "Advanced" tab and click the "Environment Variables" button.
- In the "System Variables" section, find the variable named "Path" and select it. Click "Edit."
- In the editing window, at the bottom of the list, click "New" and enter the path to the "bin" folder of your JDK installation. It's usually something like this: C:\Program Files\Java\jdk-XX.X.X_xx\bin (the version number changes depending on the one you have installed).
- Click “OK” in all open windows to save the changes. Important! Don't delete any of the other paths already in the PATH, just add the new line.
Verify that the installation and configuration was successful
You're almost there. All that's left is to check that everything is perfect. To do this:
- Open a new command prompt window (cmd).
- Write java -version and press Enter. You should see the newly installed Java version.
- Write javac-version and confirms that the correct version also appears.
- If both commands return the newly installed version, you have correctly configured your environment and can begin compiling Java programs without any problems.
What to do if Java doesn't work after installation?
There are some common mistakes you may encounter:
- The 'java' or 'javac' command is not recognized.: This indicates that the JDK path is not entered correctly in your PATH. Review the previous step and make sure you haven't missed any characters or entered a wrong version.
- You have multiple versions of Java installed: Sometimes other applications include their own JRE. Make sure the PATH points to the "bin" folder of the most recent JDK.
- insufficient permissionsIf your account isn't an Administrator account, you may experience problems. Try running the installer or Command Prompt as Administrator.
Download and install OpenJDK on Windows (free alternative)
As an alternative to the official Oracle version, OpenJDK offers a completely free development environment. The process is very similar:
- Visit the official OpenJDK website or reputable portals such as Adoptium or Amazon Corretto.
- Download the appropriate installer for Windows. Many distributors offer .msi installers that make your life easier.
- The process is just as simple: run the installer, accept the license, choose the destination folder, and follow the steps.
- Don’t forget to add the “bin” folder to your PATH, just like with the Oracle JDK.
- Check operation as described above.
Post-installation recommendations for Java developers
- We recommend you install a good code editor or IDE specialized in Java development, such as Eclipse, IntelliJ IDEA, or NetBeans. This way, you'll take advantage of all the utilities included in the JDK.
- Do simple tests by compiling your first Hello World puedo cambiarlo In Java, opening a .java file from the editor, compiling and running it with the commands Javac y Java to make sure everything works perfectly.
- If you're going to be working on complex projects, it may be worthwhile to also install tools like Maven or Gradle to manage dependencies and automate tasks.
- Remember to regularly check for new JDK versions to keep your environment up-to-date and secure.
Updates and management of different versions
Java evolves rapidly, with new updates and LTS (Long Term Support) releases appearing every few months. If you need to work with multiple versions of Java on the same computer, there are tools like SDKMAN! (most commonly used on Linux/Mac) or version management scripts on Windows, or you can change the PATH variable manually depending on the project you are going to compile. Always keep the official documentation and the websites of downloads by hand to avoid installing outdated or insecure versions.
Once you know how to handle the installation and configuration of the JDK, it will be much easier for you to tackle any Java-based project, install frameworks, application servers or development platforms such as Android Studio. To delve deeper into advanced topics, you can consult How to troubleshoot common errors in Java and other platforms.
Having the Java environment properly configured may seem tricky at first, but once you understand the concepts of PATH, environment variables, and the differences between JRE and JDKYou'll find that it's all a matter of patience and attention to the smallest details. This way, you can focus on what's most important: learning and enjoying programming in one of the most powerful and universal languages in the world.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.