Classpath and Sourcepath

Each project has a classpath and a sourcepath setting.

The classpath will be used by the debug JVM to find the classes of the program you are debugging when the program is launched from within BugSeeker (by selected Debug | Start Process). You should ensure that the classes for your application, applets or servlets are present in your project's classpath.

The project's classpath setting will be ignored if you are using BugSeeker's remote debugging capabilities to connect to a process launched externally. Details on how to set the classpath for processes launched externally are platform specific.

The sourcepath on the other hand is a listing of directories, zip files and jar compressed archives that contain the source files of all the classes you wish to trace through. Unless you are only interested in debugging library code, you most likely will want to ensure that the source files for the program you are trying to debug are present in your project's sourcepath because BugSeeker will search for source files it needs in this sourcepath. If it cannot find the source file for the current class you are tracing through, you will be unable to see which line you are at making debugging of your code very difficult.

All entries in the sourcepath should point to the base directory where your source files are kept. The way BugSeeker looks for your source files is very similar to the way the Java Virtual Machine looks for classes in the classpath. For example, if class java.lang.String is declared in a file named String.java which is stored in directory C:\src\java\lang\, for BugSeeker to be able to find the source file, C:\src should be in your sourcepath, not C:\src\java\lang.

Unlike the classpath which is ignored when you are remote debugging, the sourcepath will be used to look up source files when you are currently debugging remotelyIf the remote process is compiled and . launched on a separate machine that the one you are running BugSeeker on, you will need to ensure the process's source files are accessible from BugSeeker itself.

To configure which path (classpath or sourcepath) you are currently editing, select from the drop down combo in the Paths tab of Project | Project Properties.

To add an entry to the classpath or sourcepath, press the Add button and a file chooser will be displayed. Select one or more directories, zip or jar compressed archives, and they will be added to the top of the classpath or sourcepath list.

To remove entries from the classpath or sourcepath, select the path entry and press the Remove button. Shortcut: pressing the delete key will also remove path entries.

To simultaneously add entries to both the classpath and sourcepath, press the Add 2x button and select the items to add.

Ordering.

The ordering of entries in the classpath/sourcepath is important. When the JVM loads classes, it will search each classpath entries from top to bottom. When BugSeeker looks for a source file, it will search the sourcepath, also going from top to bottom from the list. Please note that if you are using a custom Java runtime configuration (specified in the Runtime tab of Project | Project Properties) and this runtime configuration has entries in its runtime sourcepath prepend list, the runtimes sourcepath entries will be searched first before the project's sourcepath.

The Up and Down buttons allow you to rearrange the classpath/sourcepath entries. Only one entry can be moved up or down at a time.

Editing the path manually

If you want to perform some major changes the classpath or sourcepath, press the Edit button and a mini text editor will be displayed that will allow you to type in new path entries; cut, copy or paste paths; or completely rearrange the ordering of entries.