In VisualAge for Java, each runnable class is responsible for its own class path. The class path is necessary when running a class in order for the class loader to properly find the classes that your class references and the classes that they in turn reference.
You can specify a workspace-level class path that every class will get use it is run (similar to traditional CLASSPATH environment variables). This class path is also needed to find resource files your classes use. The workspace class path is set from the Resources page in the Options notebook.
In addition, each class must have a class path associated with it in order to run. Typically the class path needs to include every project (directory) containing classes the runnable class references or resources it uses. To set the class path for a class:
Or:
Both of these methods open the class's properties notebook to the Class Path page.
The class path tab contains the following three-part definition for the class path:
Typically
you should avoid using this field. When using it , exercise care because if you
specify a path such as c:\personal\mystuff, then users who access your class path settings
saved to the repository and do not have that directory structure may experience run-time
errors. Ideally you should place any such directories under project_resources. This way
the IDE can compute a relative path, which all users who use the class may have.
The class path for your class is formed by concatenating these three settings plus the workspace path.
Once you have configured your class path you can save it locally (for example, if you are experimenting with a class) or you can save it into the repository. If you do not save it to the repository, then the information is only in your workspace.
To save the class path settings to the repository, enable the Save in repository (as default) checkbox before clicking OK.
Once it is
saved into the repository anyone else loading your class can then pick up those settings
as the default.
Important! When you export a project or package, the class path information stored with the class in the repository is used. Any class path values stored only in your workspace are not exported.
For any class, to retrieve the default class path settings that are saved in the repository, click the Defaults button.
Debugging External Classes
The debugger settings in the Options dialog include a class source path, in which
you can set the path to source code for the external classes used by your
application. This allows you to step into methods in external classes when you
debug. Set the debug source path on the Debugging page of the Options dialog.
Setting the Class Path for Classes that Use JFC
If you created a class and wrote code for it that uses JFC, then you must update
the class path for it to include the path to the JFC project directory. Otherwise,
the class will not run.
To update the class path: