Path testing is nothing more than ensuring that JSwat handles the classpath and sourcepath correctly. This document serves a dual purpose: it documents how the paths should be handled, and it describes how to verify that JSwat is working as expected.
Both the classpath and sourcepath are maintained by the
PathManager
class. It stores the paths in session
properties.
The classpath session property can be modified under two conditions:
classpath
command or the "Set Classpath"
dialog.java.class.path
system property.While the JSwat session is active, the classpath will appear to be that of the debuggee VM. After the session is deactivated, the classpath will return to the value before the session was activated.
The sourcepath session property can be modified under two conditions:
sourcepath
command or the "Set Sourcepath"
dialog.java.source.path
system property is set when
JSwat starts, in which case this value will overwrite the
sourcepath session property .Ensure that the classpath session property is not overwritten by simply connecting to a remote debuggee. This is accomplished using the following steps:
See the appropriate command and dialog test cases to learn how to test setting the classpath and sourcepath.