Three Java environment variables to be configured for Eclipse installation, and the eclipse Environment Variables

Source: Internet
Author: User

Three Java environment variables to be configured for Eclipse installation, and the eclipse Environment Variables

My computer → properties → advanced system settings → advanced → Environment Variables


1. JAVA_HOME: JDK installation path

2. PATH: % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;

3. CLASSPATH:.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar;



Do I need to configure the Java environment variable for this installation?

If MyEclipse is used as a development tool, environment variables do not need to be configured. myeclipse will automatically find jdk installation configuration, in myeclipse, you can also configure the corresponding jdk and jre as needed, but generally it is automatically configured as what you install
If you do not need development tools such as myeclipse, environment variables will be used. For example, if you want to configure a command prompt, there is a positive solution upstairs, but you do not need to configure it. If you want to configure it, you only need path, and classpath, while java_home is set for later jdk changes. I have consulted a lecturer.

How to configure the environment variables to be configured if you want to run eclipse or compile a java file?

Configure environment variables: Right-click "my computer" --> "advanced" --> "environment variables"
Variable name: JAVA_HOME

Variable value: C: \ Program Files \ Java \ jdk1.6.0 _ 10

Click New again:

Variable name: classpath

Variable value:.; % JAVA_HOME % \ lib \ tools. jar

And add it to the path (do not delete the original ones); C: \ Program Files \ Java \ jdk1.6.0 _ 10 \ bin

Then execute the javac command at the command prompt to see if it can be run.
4. "Start" --> "run" --> Enter "javac" --> "Enter". If yes, the configuration is successful!
(Here C: \ Program Files \ Java \ jdk1.6.0 _ 10 refers to the installation directory path of your JDK installation. You can modify it based on the drive letter you installed)

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.