Java Reference
In-Depth Information
FIGURE A.12
Editing your sys-
tem's environment
variables.
A
Look for a line in the file that contains the text SET CLASSPATH= command followed by a
series of folder and filenames separated by semicolons.
CLASSPATH is used to help the Java compiler find the class files that it needs. The SET
CLASSPATH= command in Figure A.12 included two things with a semicolon between
them:
.
n
c:\jdk1.6.0\lib\tools.jar
n
A CLASSPATH can contain folders or files. It also can contain a period character ( “.” ),
which is another way to refer to the current folder in MS-DOS.
You can see your system's CLASSPATH variable by typing the following command at a
command line:
ECHO %CLASSPATH%
If your CLASSPATH includes folders or files that you know are no longer on your com-
puter, you should remove the references to them on the SET CLASSPATH= line in
AUTOEXEC.BAT . Make sure to remove any extra semicolons also.
To set up the kit correctly, the file containing the Java class library must be included in
the SET CLASSPATH= command. This file has the filename tools.jar . If you installed the
kit in the C:\Program Files\Java\jdk1.6.0 folder on your system, tools.jar is prob-
ably in the folder C:\Program Files\Java\jdk1.6.0\lib .
If you can't remember where you installed the kit, you can look for tools.jar by click-
ing Start, Find, Files or Folders from the Windows taskbar. If you find several copies,
you should be able to find the correct one using this method:
Search WWH ::




Custom Search