download

Matakuliah
Tahun
Versi
: M0074/PROGRAMMING II
: 2005
: 1/0
MATERI PENDUKUNG
CLASSPATH
1
• Setting the class path for commandline tools
• The class path tells Java tools where to
find classes that are not part of the
Java platform. You can set the path to
the classes with the -classpath option
or by setting the CLASSPATH
environment variable described in the
following topic. The -classpath option
temporarily overrides the CLASSPATH
environment variable for the current
command-line session. It's best to use classpath as you can set it for each
application, and it does not affect other 2
applications.
• Directories listed in the classpath are separated by
colons on the UNIX platform and by semicolons on
the Windows platform. You should always include
the system classes at the end of the path. The
classpath is also used to search for sources if no
sourcepath is specified.
• For more information on class paths, see the Java
documentation on "Setting the classpath."
• For more information on the JBuilder IDE and class
paths, see "How JBuilder constructs paths" and
"Where are my files?" in "Managing paths" in
Building Applications with JBuilder.
3
• Using the -classpath option Use the classpath option to temporarily set the
path to your classes.
– UNIXThe -classpath option takes the following
form: % jdkTool -classpath path1:path2
– WindowsThe -classpath option takes the
following form: C:>jdkTool -classpath
path1;path2
4