Today we will learn how to download and install java on Windows 10. If you are new to java programming then this is the first step you need to perform. Until unless your java Windows 10 environment is setup properly, you will not be able to develop java programs and run them successfully.
Table of Contents
Java Windows 10
Setting up java on Windows 10 is really easy, just follow the steps as follows:
Java download for windows 10
Java Windows 10 installation steps
Java on Windows 10 Version Check
Download and Install Java IDE
First step is to download java installation files from Oracle’s website. Java 9 is the latest version, so go to this link and accept the license agreement. Then click on the download link for windows as shown in below image and save the file.
Note: If you are trying to install Java 8 or earlier, then you need to know whether your Windows 10 is 32-bit or 64-bit. It’s because there are two different installers for Windows as seen in this link for java 8 binaries.
If your Windows 10 is 32-bit OS then download
Windows x86 exe file, else download
Windows x64 exe file.
If you are not sure of your Windows version, you can easily check it in
Settings > System Settings > About.
Next step is to run the downloaded java installer exe file. Just double click on it and follow the steps. Most of the time you don’t need to check anything and go with default selection, below are images from my installation screens. They might differ little bit based on your java version installation but mostly it’s same as usual.
Finally, we have to check if java is installed properly or not. We can do that by using
java -version command in command prompt, as shown in below image.
Note: In older java versions and other windows operating systems, you need to setup two environment variables to get it working.
System Properties (Right Click on My Computer and select Properties) > Advanced > Environment Variables.
In the popup window, System variables section, click on New button and add a variable with following details:
Value: C:\Program Files\Java\jdk1.6.0_25
After this, you need to edit the Path variable already present there. Just select Path variable and click on Edit button. In the popup window value section, go to the end and add following
;C:\Program Files\Java\jdk1.6.0_25\bin (The colon ; is used as delimiter, so don’t miss that!)
Now your setup is done and you can check it by opening a command prompt and running command
java - version.
In windows 10 and java 9 we don’t need to do these manually. Java installer takes care of that and you can check environment variable Path value, as shown in below image. Note that we don’t need to set JAVA_HOME variable.
This is an optional step but highly recommended. If you want to get things done easily, you should install either Eclipse, Intellij Idea or NetBeans IDE that helps a lot in development of java programs. Just download and install it with executable file, they are straight forward.
That’s all for downloading and installing java on windows 10. Let me know if you face any issue in setting up the environment.
What’s after installing Java
Now you are ready to learn java programming, go through the articles on core java tutorial and learn java programming step by step.
Note: Few years back, I made this video to install java 8 on windows 10. Steps are still almost same so you can watch it to get more idea about it.
Also if you want to have multiple java versions and want to switch between then easily, then go through this short 2 minute video.