Java Environment Configuration

Source: Internet
Author: User

available to https://www.java.com/zh_CN/download/ Direct Download

First step: Install the JDK file first.

Double click

Enter the installer and click Next

Note : below steps (install to default path) → click Next

Step two: The installation of the JRE file will automatically pop up during the installation process.

(default path can be) Click next → wait for the installation, jump back to the previous installation page → Click Close--Complete the JDK and JRE installation

When the installation is complete, enter java–version on the command line

If the effect in the diagram appears, the installation of the JDK is successful

Step Three: Configure environment variables.

① Find My Computer right click → properties → advanced system settings

(Right click on My Computer icon to select Properties)

Click to enter → select advanced → environment variable Click to enter environment variable menu

② Find system variable (S) → Click New

variable name fill in: Java_home (Locate the path to the JDK file installed in your computer.) )

Variable value fill in: JDK installation directory

as C:\Program Files (x86) \java\jdk1.8.0_101 Click OK.

③ Find the system variable (S) → Look for the Path variable → click edit (or double-click)

Added at the end of the variable value (replicable)

(Locate the Bin directory under the Java file under the installed JDK files in your computer and under the JRE directory under the JDK file.) )

(allows us to invoke commands from two files on the command line anytime, anywhere, without having to find the file before using it)

(Note that the value of the original path is not at the end of the variable, the (English) number, if not, first enter; Enter the following code)

%java_home%\bin;%java_home%\jre\bin;

Click OK

④ Find system variable (S) → Click New

Variable name fill in: CLASSPATH variable

Variable value filling (replicable)

(found in the JDK directory in the Lib directory, Sun has written to provide users with the class library, and found in the JDK directory Lib Tools.jar, it is a tool class library, compile and run the need to use.) )

(Note the first point, which represents the current working directory of the Java Virtual Runtime (the path to the written. Java source file))

.; %java_home%\lib;%java_home%\lib\tools.jar

Click OK

Finally click OK to exit the Setup to complete the configuration.

After the configuration is complete, enter Java on the command line

After completing the above, enter JAVAC in the command line

If the effect in the diagram appears, the installation of the JDK is successful

Java Environment Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.