Java environment variables

Source: Internet
Author: User

Previously, when I configured environment variables, I directly searched for the ready-made environment variables from the Internet and moved them to use them. Today I have nothing to understand. The following is a summary:

Configure environment variables:
1. Install JDK and customize the directory;

2. After the installation is complete, right-click "computer"> "properties"> "Advanced System Configuration"> "advanced"> "environment variable ";

3. In "system variables", set three attributes: java_home, path, and classpath (case-insensitive). if it already exists, click "edit". If it does not exist, click "new ";

4. Configure java_home first. Here is the JDK installation directory, as shown in"C: \ Program Files \ Java \ jdk1.6.0 _ 10"

Configure path. Here, configure the JDK bin directory and jdk jre/bin directory, this allows the system to identify Java commands in any path (to start the doscommand window to execute javac and other tools at any location, the system can find the location of these tools. When DOS is opened in the directory where javac is located under the installation directory, the javac program will be started, but javac cannot be found if no environment variable is configured .): % Java_home %/bin; % java_home %/JRE/binI didn't understand % java_home % before, but now I understand that actually a variable is referenced. The value of the variable is the java_home path just set;

Note: Other variables may be configured in the path. Do not delete other variables. Otherwise, other programs may be affected and may not run; if Oracle environment variables are configured in path
% Java_home %/bin; % java_home %/JRE/binPut it in front of the Oracle variable (there are kids shoes on the Internet, which has not been verified)

Finally, configure classpath, which is set.; % Java_home %/lib/dt. jar; % java_home %/lib/tools. JarNote the preceding point. Separate environment variables with semicolons ([:] For Linux).

 

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.