Current location - Quotes Website - Personality signature - Why should java set environment variables when programming with commands? How to set environment variables? Urgent! Urgent! Urgent!
Why should java set environment variables when programming with commands? How to set environment variables? Urgent! Urgent! Urgent!
System environment variables after installation

Setting of path value

The Java compiler (javac.exe) and Java interpreter (java.exe) provided by the SDK platform are located in the bin folder of the Java installation directory. In order to use the compiler and interpreter in any directory, you should set the path in the system properties. For Windows2000, Windows2003 and Windows XP, right-click the My Computer pop-up menu, then select Properties to pop up the System Properties dialog box, click Advanced Options in the dialog box, and then click Environment Variables to add the following system environment variables:

Variable name: path,

Variable value: E:\jdk 1.4\bin

For example: c: \ program files \ Java \ JDK1.5.0 _ 01\ bin.

If you have set the environment variable Path, you can click it to edit and add the required values. For Win9x, edit the Autoexec.bat file with Notepad and add the following setting statement, path = e: \ JDK1.4 \ bin; ? You can also type the command in the command window, such as MS-DOS window: path = e: \ JDK1.4 \ bin; ?

The jre folder under the SDK installation directory contains the Java class libraries needed by Java application runtime, which are contained in a compressed file rt.jar under jre\lib. Usually, when installing the SDK, you don't need to set the value of the environment variable ClassPath. If your machine has installed some commercial Java development products or some products using Java technology, such as PB and Oracle, the value of ClassPath may be modified after installing these products. Then when you run a Java application, you may load the old version of the class library brought by these products, which may lead to the failure to find the class to load and make your program run incorrectly. You can re-edit the value of the system environment variable ClassPath.

For windows 2000, Windows2003 and WindowsXP, right-click the "My Computer" pop-up menu, then select Properties to pop up the "System Properties" dialog box, click the advanced options in the dialog box, and then click "Environment Variables" to add the following system environment variables:

Variable name: classpath

Variable value: e: \ JDK1.4 \ JRE \ lib \ rt.jar; . ;

For example: c: \ program files \ Java \ JRE1.5.0 _ 01\ lib \ rt.jar; . ;

If you have set the environment variable: ClassPath, you can click it to edit and add the required values.