Java 8

Java 8 – How to set JAVA_HOME on Windows10

In this tutorial, I am going to show you how to set  JAVA_HOME on Windows10 operating system.

Note: Assuming Java8 installed on your local (Windows10) machine, if not, you can see our previous tutorials.

Set JAVA_HOME on Windows10 :

It will take several steps to create  JAVA_HOME.

Open Environment Variables :

Search for Advanced System Settings in the Search box like below:

JAVA_HOME on windows10

by selecting the above Advanced System Settings, you can see the below System Properties window.

JAVA_HOME on windows10

Click on Environment Variables >

Click on New button under System variables session to create JAVA_HOME :

JAVA_HOME on windows10

Enter variable name as “JAVA_HOME”, give variable value as your JDK path and click Ok.

Note: The variable value should till java home path, it doesn’t include \bin.
JAVA_HOME on Windows10

Now select the Path variable and click on the Edit button :

JAVA_HOME on windws10

Now opens another window like below: This is a new widow introduced from Windows10.

JAVA_HOME windows10

Here click on the new button and add environment variable %JAVA_HOME%\bin like below.

JAVA_HOME on Windows10

Click on OK.

Test :

Open the command prompt and execute below  commands:

JAVA_HOME

Happy Learning :)

Found a mistake or something out of date? Tell us →

Written by

chandrashekhar

Founder of onlinetutorialspoint.com. Enterprise architect with 15+ years in healthcare technology, designing and running systems on AWS and Azure. Writes about building real things with AI, local AI hardware and cloud certifications.

Keep reading

4 comments

  1. As a full stack guy that gets around on Linux all day I found this setup in Windblows very very taxing. I was just trying to run a local Android Emulator for React Native development, just to give my kids some games without ads…

    After hours of failure I found this.

    *bowing*

    Thank you, sir,
    Neil

Ask a question or leave a comment