#Download JDK
Download address: https://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.htmlClick the download button:Start installing JDK: can be set to the path you want to install.
Environment variable configuration
1. Open the environment variables window
right-click This PC(this Computer) -> Properties -> Advanced system settings -> Environment Variables...
2. Create a new JAVA_HOME variable
Click the New... buttonInput:
Variable name: JAVA_HOMEVariable value: The absolute path of the JDK installation on the computerAfter inputting, click OK. #The following files must be visible in the JDK path.
3. Create/modify CLASSPATH variable
If the CLASSPATH variable exists, select it and click Edit. If not, click New... to create a new one. Enter/add after the existing variable value:Variable name: CLASSPATHVariable value: .;%JAVA_HOME%\lib\dt.jar ;%JAVA_HOME%\lib\tools.jar;Click OK to save.
#4. Modify the Path variable
Due to the difference in win10, when the Path variable is selected, the system will easily All different paths are separated and will not be connected together like win7 or win8. Create two new paths:%JAVA_HOME%\bin %JAVA_HOME%\jre\bin
PHP Chinese website has a large number of free
JAVA introductory tutorialsThe above is the detailed content of How to configure environment variables in java. For more information, please follow other related articles on the PHP Chinese website!