Configuring Java JDK Environment variables

Source: Internet
Author: User

1. First install the Java JDK, the installation process can not install the JRE.

2. Configuring the JDK environment variables

2-1. Create a new Java_home variable and add a value

Variable name: Java_home variable Value: C:\jdk1.8.0_131

2-2. Add a Path value

Variable name: Path variable Value: C:\jdk1.8.0_131\bin or%java_home%\bin

2-3. Create a new Class_path variable and add a value

Variable name: Class_path variable value:.; C:\jdk1.8.0_131\lib; C:\jdk1.8.0_131\lib\dt.jar; C:\jdk1.8.0_131\tools.jar or.; %java_home%\lib;%java_home%\lib\dt.jar;%java_home%\tools.jar

3. Code test environment variable If there is a problem

3-1. Create a new Test.java file that reads as follows:

public class test{
public static void Main (string[] args) {
System.out.print ("success\n");
}
}

3-2. Open a new CMD window

1) Input Javac Test.java//No output indicates successful compilation

2) Input Java Test//Output success indicates that there is no problem with the environment variables configured above

    

    

Configuring Java JDK Environment variables

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.