Configure JAVA and TOMCAT environment variables in WINDOWS

Source: Internet
Author: User


Environment variables: (Windows 7) Right-click the computer on the desktop, select properties, and click Advanced System settings on the left. The system properties setting box is displayed. Click the environment variables at the bottom, the environment variable Setting dialog box is displayed.
Environment variables include system variables and user variables. If configured in user variables, the environment variables take effect only for the current user. If configured as system variables, they take effect for all users, there should be no other difference.
In the environment variables, we use two special environment variables: PATH and CLASSPATH, you can run the following commands directly at the command prompt:
We add your JDK directory (for example, D: \ JAVA \ JDK1.7.0 \ binning) to the environment variable, which includes files such as java.exe and javac.exe. We can execute commands such as java and javac at the command prompt. Another CLASSPATH is not mentioned here. You can reference the environment variable in the environment variable configuration in the following format: % variable name % English ending point (.) represents any current path.
Java environment variable configuration: Configure JAVA_HOME (in the format of variable name = variable value [Example value]): JAVA_HOME = Your JDK directory [D: \ Java \ jdk1.7.0] configure JRE_HOME (optional) JRE_HOME = Your JRE directory [D: \ Java \ jdk1.7.0 \ jre]
PATH configuration: Find the PATH variable in the system variable. If not, create a new variable. If yes, double-click it and add it after the existing variable value, variable configuration values are separated by semicolons (;). You need to add the following variable values: PATH = % JAVA_HOME % \ binPATH = % JRE_HOME % \ bin (optional) Configure CLASSPATH: CLASSPATH = D: \ Java \ jdk1.7.0 \ lib \ dt. jar
TOMCAT configuration: Configure CATALINA_HOME: CATALINA_HOME = Your TOMCAT directory [D: \ Develop \ apache-tomcat-7.0.2] configure PATH: PATH = % CATALINA_HOME % \ bin for testing: start "->;" run ", and type" cmd "(test here). You can enter the following commands:" java-version "," java ", and" javac, when the screen appears, the environment variable is successfully configured.

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.