Java is a programming language developed by Sun to apply to a distributed network environment, and the Java language has cross-platform features, and its compiled programs can run on a variety of operating system platforms, enabling the "write once, run everywhere" powerful feature.
1. To successfully configure Java environment variables, it is necessary to install the JDK in order to start the configuration.
2. Install the JDK (as prompted by the wizard).
3. After the successful installation, the test is really successful installation, click "Start"----"Run"----input CMD, at the command prompt input "java-version" and press ENTER, appear, that is, the installation is successful.
4. Start configuring environment variables below, right-click My Computer---properties-----advanced---environment variables.
5. Select "New System Variable"--pop up the "New System Variable" dialog box, enter "java_home" in the "Variable name" text box, and enter the installation path of the JDK in the "Variable Value" text box (that is, the folder path of step 5, for example: D:\ Program files\java\jdk1.8.0_144), click the OK button.
6. View the path variable in the system Variables options area, and if it does not exist, create a new variable path, otherwise select the variable, click the Edit button, and add the%java_home%\bin;%java_ at the beginning of the Variable Value text box Home%\jre\bin;" or direct "%java_home%\bin;", click the OK button.
7. View the CLASSPATH variable in the system Variables options area, and if it does not exist, create a new variable CLASSPATH, otherwise select the variable, click the Edit button, and add "at the beginning of the Variable Value text box."; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;".
8. Now the test environment variable is configured successfully or not. Enter "JAVAC" in the DOS command line window and the output Help information is configured correctly.
Precautions
Configuring environment Variables for Java