Classpath configuration

The classpath for an application that runs on a Sun SPOT needs to include the following jars in this order:

SDK_INSTALL_DIRECTORY/lib/transducerlib_rt.jar

SDK_INSTALL_DIRECTORY/lib/multihoplib_rt.jar

SDK_INSTALL_DIRECTORY/lib/spotlib_device.jar

SDK_INSTALL_DIRECTORY/lib/spotlib_common.jar

SDK_INSTALL_DIRECTORY/lib/squawk_rt.jar

The classpath for a host application that uses the base station needs to include the following jars in this order:

SDK_INSTALL_DIRECTORY/lib/multihoplib_rt.jar

SDK_INSTALL_DIRECTORY/lib/spotlib_host.jar

SDK_INSTALL_DIRECTORY/lib/spotlib_common.jar

SDK_INSTALL_DIRECTORY/lib/squawk_classes.jar

Javadoc/source configuration

Source is included for these jars:

transducerlib_rt.jar

SDK_INSTALL_DIRECTORY/src/transducerlib_source.jar

multihoplib_rt.jar

SDK_INSTALL_DIRECTORY/src/multihoplib_source.jar

spotlib_device.jar

SDK_INSTALL_DIRECTORY/src/spotlib_source.jar

spotlib_common.jar

SDK_INSTALL_DIRECTORY/src/spotlib_source.jar

spotlib_host.jar

SDK_INSTALL_DIRECTORY/src/spotlib_host_source.jar

Javadoc for all the above and for squawk_rt.jar can be found in:

SDK_INSTALL_DIRECTORY/doc/javadoc

Debugging

The Squawk high-level debugger uses the industry-standard JDWP protocol and is compatible with IDEs such as NetBeans and Eclipse. Note that it is not currently possible to debug a SPOT directly connected via USB, but instead, the target SPOT must be accessed remotely via a base station.

The Squawk high-level debugger comprises the following:

A debug agent (the Squawk Debug Agent, or SDA) that executes in the Sun SPOT being debugged. The agent is responsible for controlling the execution of the installed application.

A debug client, such as JDB, NetBeans or Eclipse.

A debug proxy program (the Squawk Debug Proxy, or SDP) that executes on the desktop. The proxy communicates, over the air via a Sun SPOT base station, between the debug client and the debug agent.

To use the high-level debugger do the following:

1.Set up a standard Sun SPOT base station.

2.Build and deploy your application as normal, either via USB or over-the-air.

3.Ensure that the SPOT running your application has the OTA Command Server enabled:

ant enableota

4. In the root directory of your application do

ant debug –DremoteId=xxxx -Dbasestation.addr=yyyy

43

Page 43
Image 43
Sun Microsystems V2.0 manual Debugging, Classpath configuration, Javadoc/source configuration