JDK download Installation and Java environment variable configuration small white detailed introduction

Source: Internet
Author: User

One, download the installation JDK (Java Developmet kit):

Go to http://www.oracle.com/download jdk

Clicking on the download below the JDK will jump to the following screen:

Tick the consent agreement to download your JDK for the operating system.

After downloading the installation without brain operation, just pay attention to try not to install to the C drive.

Second, configure environment variables

The configuration environment variable is in order to give the system a path, so straightforward to find the instructions you want to use, instead of having to go into this path each time. For example, in the development of Java is often used to Javac.exe, Java.exe. They were in the D:\JDK\java\bin I installed (customized when the path was installed) and I needed to add this path to the default path of CMD each time it was automatically retrieved.

Computer--Properties--Advanced system settings--environment variables

1, create a new JAVA_HOME:JDK installation directory where you can find lib,bin these folders

2. Modify the path environment variable to point to the bin directory of the JDK so that you do not need to type a large string of paths when compiling and executing programs under the console. The Setup method is to preserve the contents of the original path and add%java_home%\bin to it. Percent of a reference to the path that was created

Locate the PATH environment variable and add:"%java_home%\bin;", give him the path to the bin file

3, New CLASSPATH: First of all to note is the front of the ".;". This is the class file that tells the JDK to find the current directory when searching for class

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

But!!!!!

Since the jdk-9 has been no tools.jar and Dt.jar, and do not need to configure these jars in the classpath, configuration can refer to:
JAVA_HOME=JDK Installation Path
JRE_HOME=JRE Installation Path
path=;%java_home%\bin;%jre_home%\bin
Classpath=.; %java_home%\lib;%jre_home%\lib

Support for the Java environment variable is configured, in the CMD input Java or javac have something to do

JDK download Installation and Java environment variable configuration small white detailed introduction

Related Article

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.