Setting the Runtime Classpath

See Also 

By default, the runtime classpath of each  contains the project's compiled classes and everything in the project's compilation classpath. For information on viewing the compilation classpath, see Managing the Classpath.

If your project uses special libraries dynamically at runtime through an indirect interface or reflection (like JDBC drivers or JAXP implementations), you have to add these libraries to the runtime classpath.

You also have to adjust your runtime classpath if the runtime dependencies between your projects do not match the compilation dependencies between the projects. For example, imagine that project A compiles against project B, and project B compiles against project C, but project A does not compile against project C. This means that project A only has project B on its runtime classpath. If project A requires both project B and project C during execution, you have to add project C to project A's runtime classpath.

To set the runtime classpath:

  1. Right-click the project node in the Projects window and choose Project Properties.
  2. In the Project Properties dialog box, select the Libraries node in the Categories pane.
  3. Select the Run tab in the dialog's right pane.
  4. Add the necessary elements to the project's runtime classpath by clicking the appropriate button. You can add any of the following:
  5. (Optional) Click the Move Up and Move Down buttons to alter to the classpath priority.
See Also
Running Tasks: Quick Reference
Running an Application
Running a Single File
Setting the Main Class and Runtime Arguments
Managing the Classpath

Legal Notices