JAVA_HOME environment variable setting
First right-click [Computer] and enter [Properties] and then select [Advanced System Settings]
Click to enter [Environment Variables] in [Advanced] to enter the environment variable editing interface
Click [System Variables] below 】, the JAVA_HOME variable does not exist, then we need to click [New]
Variable name input: JAVA_HOME
Recommended learning video tutorial: java video tutorial
The variable value refers to the actual installation path (for example, the editor's path is: C:\Program Files\Java\jdk-9), and finally click OK.
PATH variable setting
Also in [System Variables] we can see that the path variable already exists, then we only need to click [Edit] to enter the path variable Edit
The variable name remains unchanged, the variable value is changed to [%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;], and finally click OK
Classpath variable setting: There is no need to set classpath after java1.5 version
Similarly, there is no Classpath variable in the system variables. Click to enter [New]
Type the variable name [Classpath]
Type the variable value [.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME %\lib\tools.jar; ]
Be careful not to miss the symbols in the variable value, and finally click OK
Test whether the configuration is successful
Similarly, search [cmd] in [Start], and then type [java] and [javac].
The message shown in the figure appears, indicating that the configuration is successful.
java learning tutorial recommendation: java quick start
The above is the detailed content of How to set java environment variables. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.