How to install Java on Windows 10

Java is the most demanded programming language in IT industry. It runs on billions of devices including servers, desktops, mobile phones and house hold devices like TV, fridges etc.

Installing Java on Window 10 feature image

Java was originally invented by Sun Microsystems, but Oracle took over it and now Java is a Oracle product. What is JRE and JDK ?

If you want to run a java based application on your system, then you need to have java installed on your system and that is done by installing JRE (Java Runtime Environment).

But if you want to develop a java application, then you need to have a JDK (Java Development Kit) software installed on your system. Where will you get JDK ?

Go to Oracale.com and download the latest version of JDK for your Windows system. With JDK SE (Standard Edition), you can develop and build a Java application, but at enterprise level, it’s not free.

If you want a complete free version of JDK, then you can download Open-JDK, developed by Java community and have all the same features of Oracle-JDK.

Download Oracle-JDK

Step 1

Go to Google.com and search for download jdk and open the first link of Oracle.com.

search download jdk on google

Step 2

A Java SE Downloads page will open, click on JDK Download button.

Java SE Downloads page

Step 3

Now you will be redirected to actual JDK download page where you can download JDK for Linux, Mac and Windows. Scroll down to the end of the page and then download appropriate JDK for Windows.

If you want to install JDK on your system, then download .exe file otherwise download .zip. You can extract the zip file at any location and run JDK from there.

Download jdk-15_windows-x64_bin.exe

Step 4

Finally your download is ready and you will see a popup window to download JDK.

final JDK download window

Install JDK on Windows

Step 1

Go to your download folder and run the JDK installer you have downloaded

run JDK installer

Step 2

click on Next button

Step 3


Step 4

installation in process

Step 5

jdk installation complete

Finally Oracle-JDK installation is complete on your Windows system

Set JDK path on Windows

After JDK installation, you need to set path on Windows so that a Java program can be compiled from any location.

Step 1

Open System settings > Advanced properties from control panel.

open system settings advanced tab

Step 2

open environment variables tab

Step 3

click on edit button

Step 4

copy jdk path

Step 5

paste the path in env variable

Step 6

exiting system env variable settings

In this way you have successfully set JDK path on your Windows system.

Testing JDK installation

Now its time to check our JDK installation is working properly or not, for this open command prompt and type JAVAC -VERSION command, it will return the JDK version installed on the system.

Step 1

open command prompt

Step 2

checking jdk version

Conclusion

Now your system is ready with the latest Java JDK software installation, JDK path is set and you can do Java programs now.

At the start of Java learning, Java programs are generally written using Notepad like editors, saving them with .java extension and compiling at command prompt using JAVAC command.

Later on you can move on to modern Java IDEs like NetBeans, Eclipse etc.

Comments