0% found this document useful (0 votes)
249 views

How To Set Java - Home On Windows 10

This document provides instructions for setting the JAVA_HOME system variable on Windows 10. It involves: 1. Opening the advanced system settings and environment variables 2. Adding a new JAVA_HOME variable pointing to the installed JDK folder, without including the \bin subfolder 3. Editing the PATH variable to append %JAVA_HOME%\bin to the end to make Java commands accessible anywhere 4. Testing the JAVA_HOME variable and that java and javac commands work as expected

Uploaded by

Elaine Barros
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
249 views

How To Set Java - Home On Windows 10

This document provides instructions for setting the JAVA_HOME system variable on Windows 10. It involves: 1. Opening the advanced system settings and environment variables 2. Adding a new JAVA_HOME variable pointing to the installed JDK folder, without including the \bin subfolder 3. Editing the PATH variable to append %JAVA_HOME%\bin to the end to make Java commands accessible anywhere 4. Testing the JAVA_HOME variable and that java and javac commands work as expected

Uploaded by

Elaine Barros
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

How to set java_home on Windows 10?

By mkyong (http://www.mkyong.com/author/mkyong/) | August 25, 2015 | Viewed : 346,909 times +2,676 pv/w

This tutorial shows you how to set a JAVA_HOME system variable on Windows 10.
Tested

1. Windows 10
2. JDK 1.8

1. Advanced System Settings


Type advanced system settings in the search box (beside the Windows start button), clicks View advanced system settings .

2. Environment Variables
Select Advance tab, clicks Environment Variables
3. Add JAVA_HOME
In System variables, add a new JAVA_HOME variable and point it to the JDK installed folder.

Note
Don’t include the \bin folder, just the JDK path. For example
1. Correct – C:\Program Files\Java\jdk1.8.0_60
2. Wrong – C:\Program Files\Java\jdk1.8.0_60\bin

4. Update PATH
In System variables, find PATH , clicks edit and append this %JAVA_HOME%\bin to the end.
P.S Puts the JAVA_HOME\bin in PATH make the Java’s commands are accessible from everywhere.
Done.

5. Test
Open a command prompt, type :

C:\Users\mkyong>java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

C:\Users\mkyong>javac -version
javac 1.8.0_60

C:\Users\mkyong>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_60

References
1. How to Open the Control Panel in Windows 10 (http://www.tenforums.com/tutorials/2691-control-panel-open-windows-10-a.html)
2. Java SE Development Kit 8 Downloads (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)

Tags : java_home (http://www.mkyong.com/tag/java_home/) windows 10 (http://www.mkyong.com/tag/windows-10/)

Share this article on


Twitter (https://twitter.com/intent/tweet?text=How to set java_home on Windows 10?&url=http://www.mkyong.com/java/how-to-set-java_home-on-
windows-10/&via=mkyong) Facebook (https://www.facebook.com/sharer/sharer.php?u=http://www.mkyong.com/java/how-to-set-java_home-on-
windows-10/) Google+ (https://plus.google.com/share?url=http://www.mkyong.com/java/how-to-set-java_home-on-windows-10/)

DO YOU KNOW YOUR TECH ODDS AND ENDS? 

What percentage of the world's money


is digital? 15

A 45%
B 92%

C 25%

D 30% Your Score 0 Question 1/10

You might also like