Unified Java environment variable configuration, how to configure the Java environment?

Table of contents

 

1. JDK download and installation

Two java environment variable configuration

Three how to configure? specific steps

Four verify whether the configuration is successful


1. JDK download and installation

Two java environment variable configuration

  • 1. Variable name: JAVA_HOME variable value: your jdk installation path
  • 2. Variable name: CLASSPATH variable value: .;%Java_Home%bin;%Java_Home%libdt.jar;%Java_Home%libtools.jar
  • 3. Variable name: path variable value: %Java_Home%bin;%Java_Home%jrebin;

Three how to configure? specific steps

3.1  Right-click the "Properties" option of "This Computer" on the computer desktop
805379-20160512222932249-1178980125.png

3.2  Select the "Advanced System Settings" option

805379-20160512223219655-1251440251.png

3.3  Click the "Environment Variables" option below

805379-20160512223357046-1881703129.png

3.4 Next is the specific configuration process: click the "New" option under "System Variables"

805379-20160512223611077-1852208980.png

3.5  Fill in "JAVA_HOME" in "Variable Name"

"Variable value" is the JDK installation path, the author's path is "D:Program FilesJavajdk1.8.0_91"

Click on the "OK" option

805379-20160512223838546-1858485630.png

3.6  Find "Path" in "System Variables"

805379-20160512224107702-1187773252.png

3.7  Select "Path" and click "Edit" option

3.8  Select "Edit Text" on the right, copy all the quotation marks "%Java_Home%bin;%Java_Home%jrebin;", to the front of the "Variable Value" column, "OK"

805379-20160512224443687-1268631944.png

3.9  In the "System Variables" column, "New", "Variable Name" is "CLASSPATH", "Variable Value" is ".;%Java_Home%bin;%Java_Home%libdt.jar;%Java_Home%libtools.jar", " Sure"

805379-20160512224843484-1356351538.png

3.10  Click the "OK" button, and remember that there are three OK buttons here

Four verify whether the configuration is successful

Go back to the computer desktop, press the shortcut key "Win+R", and enter "cmd"

Enter and press Enter: java javac java -version

805379-20160512225343452-1007903408.png

Guess you like

Origin blog.csdn.net/qq_18620233/article/details/114501882