Setting a Project Classpath

You can set a classpath at the project level. When Stylus Studio compiles or runs Java code, it always checks the project for a locally defined classpath first. If a project classpath has not been defined, Stylus Studio uses the classpath defined Java Virtual Machine page of the Options. dialog box.

Specifying Multiple Classpaths

You use the Project Classpath dialog box to specify one or more classpaths for a project. If multiple classpaths have been defined, Stylus Studio searches them in the order in which they are listed in the Project Classpath dialog box. You can use the up and down arrows at the top of this dialog box to change the classpath order.

Figure 100. Use Arrow Buttons to Change the Order of Classpaths

How to Set a Project Classpath

To set a classpath for a project:
1. Open the Project Window if it is not already displayed.
2. Right-click the project node.

The project shortcut menu appears.

Alternative: Select Project > Set Classpath from the Stylus Studio menu.

3. Select Set Project Classpath.

The Project Classpath dialog box appears.

Figure 101. Project Classpath Dialog Box

4. Click the browse folders ( ) button.

A new entry field appears in the Locations list box. Two buttons appear to the right of the entry field.

5. To add a JAR file to the classpath, click the browse jar files button ( ).

Stylus Studio displays the Browse for Jar Files dialog box.

Figure 102. Browse for Jar Files Dialog Box

To add a folder to the classpath, click the browse folders button ( ).

Stylus Studio displays the Browse for Folder dialog box.

Figure 103. Browse for Folder Dialog Box

6. When you have located the JAR file or folder you want to add to the classpath, click OK.
7. Optionally, add other JAR files or folders to the classpath by repeating step 5 and step 6.
 
Free Stylus Studio XML Training:
W3C Member