1. Right-click My Computer--Properties, click Advanced System Settings---Environment Variables. In the system variables, create a new system variable named "JAVA_HOME". The variable value is the installation path of jdk. For example, my installation is in C:\Program Files\Java\jdk1.7.0_80
2. Find the system variable Path and add ;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin; after the original variable value;
Note: If Finally, it already exists; no need to add
3. Then create a new variable name: classpath
Variable value: .;%JAVA_HOME%\lib;%JAVA_HOME% \lib\tools.jar click OK
Recommended tutorial: Java tutorial
The above is the detailed content of How to configure the java environment. For more information, please follow other related articles on the PHP Chinese website!