Configuration of Java Environment variables

Source: Internet
Author: User

The JDK (Java Development tools) and the JRE (Java Runtime Environment) cannot be installed in the same directory.

1. Install the JDK and remember the installation path of the JDK.

2. After the installation is complete, configure the environment variables, you need to configure 3 environment variables, namely path,classpath,java_home.

Procedure: Right-click on the "Computer" icon, select Properties-"Advanced system Settings-" Advanced (environment variable)--"System variables

Set System variables: Click "New", Variable name: java_home; variable value: Install the path to the JDK; click "OK"

Locate the variable path, click "Edit", append ";%java_home%\bin" at the end;

Click "New", Variable name: CLASSPATH; variable value:.; \;D: \;

The environment variable configuration is complete.

Detects if the environment variable is configured successfully:

Win+r Open "Run", enter cmd, click "OK", enter Java, then return, if a lot of text is displayed, the environment variable is configured successfully, if "Java is not internal or external processing command" is displayed,

The environment variable configuration fails, and the environment variable is configured again as described in the previous steps.

Summarize:

1. The file with the suffix ". Java" is the source file; The file with the suffix ". Class" is an executable file (bytecode file)

2. Javac compile command; Java Execution Command (required to be entered in CMD)

Configuration of Java Environment variables

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.