Delphi Clinic | C++Builder Gate | Training & Consultancy | Delphi Notes Weblog | Dr.Bob's Webshop |
|
Classpaths
The classpath is the path the Java VM searches for class files when running an application.
Setting the classpath in JBuilder is very easy.
We only have to define libraries and these libraries are used for the classpath when we run the application.
But things get different when we want to run the application outside JBuilder and we have to define our own classpath.
We can define two types of paths to add to our classpath: a directory or folder with class files, or a JAR/Zip file with class file included. It is important to include the name of the JAR/Zip file completely in the path we define. A lot of people only include the directory or folder, which contains the JAR/Zip file, but we have to include the name of the JAR/Zip file too.
So for example if we want to include a folder with class files, c:\apps\jbuilder3\myclasses, and a JAR file, c:\apps\jbuilder3\lib\jbcl3.0.jar, we must define the following classpath:
c:\apps\jbuilder3\myclasses;c:\apps\jbuilder3\lib\jbcl3.0.jar