How to JAVA_HOME in Windows 10
JAVA_HOME
is a basic term and thing to do for every Java developer. Let’s take a look how we can set JAVA_HOME
in Windows 10.
- Search for
path
and openEdit the system environment variables
app.
2. Click Environment Variables…
button.
3. Click New…
at System variables
section.
4. Enter Variable Information
4.1 Variable name: JAVA_HOME
4.2 Variable value: Click Browse Directory…
button and select your Java Development Kit (JDK) directory.
4.3 Click OK
button
5. Add JAVA_HOME
to Path
5.1 Select Path
5.2 Click Edit…
button
5.3 You will see Edit environment variable
window
5.4 Click New
button
5.5 Type %JAVA_HOME%\bin
5.6 Click OK
button to close Edit environment variable
window
5.7 Click OK
button to close Environment Variables
window
5.8 Click OK
button to close System Properties
window
6. Verify JAVA_HOME
6.1 Search for cmd
and open Command Prompt
app.
6.2 Type echo %JAVA_HOME%
and hit Enter
An application will recognizes JAVA_HOME
variable and print-out the path of your selected JDK in step 4.2
7. Verify javac
and java
You can also run command to check Java
and Java Compiler
version in Command Prompt
window.
7.1 Type java -version
and hit Enter
7.2 Type javac -version
and hit Enter
Easy! The Command Prompt app will print-out some information about Java version, build number, and Java Compiler version.
Finally, your computer is now ready for Java. Let’s rock!