win10 configure java jdk environment variable, javac is not an internal or external command

1. Install jdk, download from the official website http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

The installation directory can be customized, such as: d:\Java\jdk1.8

2. After the installation is complete, find the environment variable, and set JAVA_HOME, PATH (Path), CLASSPATH (ignoring case) in "System Variables".

3、JAVA_HOME=d:\Java\jdk1.8

Add %JAVA_HOME%\bin to Path

                %JAVA_HOME%\jre\bin

add to CLASSPATH

                     .;%JAVA_HOME%\lib\dt.jar

                    %JAVA_HOME%\lib\tools.jar

Note that to be added separately, only one line is added

test java /javac OK

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324840054&siteId=291194637