Java environment variable configuration and its role

conclusion as below:

  • JAVA_HOME: JDK installation path, for example: D: \ the Java \ JDK-11.0.3 . Set this variable is the role: You can easily modify the JDK installation path, to avoid the risk of frequent changes caused by the system path variable.
  • path:% JAVA_HOME% \ bin; original path value . Function is: so that the system can recognize the external commands can be provided by the JDK any path, such as javac, java, etc. (command line program).
  • classpath: javac compiled after setting a path through the resulting .class file is located, the role is: java run under any path classfile command, Java virtual machine can be found in the class file and run it.

Guess you like

Origin www.cnblogs.com/eslovez/p/12154839.html