Setting various environment variables in Java

Source: Internet
Author: User

For beginners of Java, setting environment variables is a major concern. Many of them are not familiar with this. Here I will share with you how to set environment variables for beginners.

"My Computer (right-click) ----> properties -----> advanced ------ environment variables"

You can see the logon user variables you are using at the top, and the following is the configured system environment variables. Generally, we can set the variables above.

Create a variable name java_home variable value C:/program files/Java/jdk1.5.0 (that is, the path of your installed Java main directory)

Then create the class_path variable value./; % java_home %/lib/tools. jar; (Note the starting part and ending part of the special mark)

Create the PATH variable value % java_home %/bin; % java_home %/LIB;

The following variables will be used for some time:

In JDBC (database) Ant JUnit, JSP is ready. I wrote my own paths below:

Ant_home C:/program files/Apache-ant-1.7.0

Catalina_home C:/program files/Apache Software Foundation/tomcat 6.0

CLASSPATH. /; % JAVA_HOME %/lib/tools. jar; E: // C:/Program Files/mysql-connector-java-5.0.6/mysql-connector-java-5.0.6-bin.jar; C:/Program Files/junit4.3.1/junit-4.3.1.jar; C:/Program Files/junit4.3.1

JAVA_HOME C:/Program Files/Java/jdk1.5.0

PATH % JAVA_HOME %/bin; % JAVA_HOME %/lib; % ANT_HOME %/bin; % ANT_HOME %/lib; % PATH %;

I use it on my computer. Please rest assured !!!

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.