How to configure Java environment variables? Java environment variable setting tutorial
How to Set Java environment variables? The Java language has the cross-platform feature. The compiled program can run on multiple operating system platforms and can implement the powerful function of "writing once and running everywhere. However, Java needs to manually configure environment variables, which is a great challenge for beginners of Java. Next, let's teach you how to set Java environment variables.
Tools required for setting Java environment variables:
JDK 1.7 installation package
Steps for setting Java environment variables:
To successfully configure the Java environment variables, you must install JDK to start configuration.
1. Install the JDK Wizard to set relevant parameters.
4. Select the installation path, which can be customized or default.
5. The installation is successful.
After the installation is successful, test whether the installation is successful. Click "start" ---- "run" ---- enter "CMD", enter "Java-version" in the command prompt box, and press the Enter key, the installation is successful.
6. Start to configure the environment variables and right-click "my computer" ---- "properties" ---- "advanced" ---- "environment variables ",
2. Select the optional features to be installed. For example:
3. Installing Program functions.
7. select "New System variable" ---- the "New System variable" dialog box is displayed. In the "variable name" text box, enter "JAVA_HOME "; in the variable value text box, enter the JDK installation path (that is, the folder path in step 5) and click OK.
8. in the "System variables" option area, check the PATH variable. If it does not exist, create a new variable PATH. Otherwise, select the variable and click "edit, add "% JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;" or directly "% JAVA_HOME % \ bin;" to the start position of the variable value text box ;", click OK.
9. check the CLASSPATH variable in the "System variables" option area. If the CLASSPATH variable does not exist, create the CLASSPATH variable. Otherwise, select the variable and click "edit, add "." To the start position of the variable value text box. % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar ;".
10. Check whether the environment variable configuration is successful. Enter "JAVAC" in the doscommand line window, and the output help information is correctly configured.
Note: Remember not to miss the last ";" symbol when editing the "variable value.