jdk environment variable configuration
- 2020-05-17 05:20:49
- OfStack
jdk environment variable configuration
To develop java, you need to install jdk first, and after installing jdk, you need to configure environment variables:
1, download jdk (http: / / java. sun. com javase/downloads/index jsp), I download version is: jdk u14 4-6 windows - i586. exe
2. Install jdk-6u14-windows-i586.exe
3. Configure environment variables: right click "my computer" -- > "Senior" > "Environmental variables"
1) create a new JAVA_HOME variable in the system variable, the value of which is: C:\Program Files\Java\ jdk1.6.0_14 (fill in according to your own installation path)
2) new classpath variable, whose value is:.; JAVA_HOME % % \ lib; % JAVA_HOME % \ lib \ tools jar
3) add a variable value to the path variable (no need to create it if it already exists) : %JAVA_HOME%\bin; %JAVA_HOME%\jre\bin (note the use of "; "between variable values) Separated)
4. "go" -- > - "run" > Input "javac" > "Enter", if the normal print usage indicates that the configuration is successful!
Analysis of supplementary environment variables:
JAVA_HOME: the installation path for jdk
classpath:java loads the classpath, which can only be recognized by the java command in classpath. A "." is added before the path to indicate the current path.
path: the system can recognize the java and javac commands in any path.
To develop java, you need to install jdk first, and after installing jdk, you need to configure environment variables:
1, download jdk (http: / / java. sun. com javase/downloads/index jsp), I download version is: jdk u14 4-6 windows - i586. exe
2. Install jdk-6u14-windows-i586.exe
3. Configure environment variables: right click "my computer" -- > "Senior" > "Environmental variables"
1) create a new JAVA_HOME variable in the system variable, the value of which is: C:\Program Files\Java\ jdk1.6.0_14 (fill in according to your own installation path)
2) new classpath variable, whose value is:.; JAVA_HOME % % \ lib; % JAVA_HOME % \ lib \ tools jar
3) add a variable value to the path variable (no need to create it if it already exists) : %JAVA_HOME%\bin; %JAVA_HOME%\jre\bin (note the use of "; "between variable values) Separated)
4. "go" -- > - "run" > Input "javac" > "Enter", if the normal print usage indicates that the configuration is successful!
Analysis of supplementary environment variables:
JAVA_HOME: the installation path for jdk
classpath:java loads the classpath, which can only be recognized by the java command in classpath. A "." is added before the path to indicate the current path.
path: the system can recognize the java and javac commands in any path.