My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Debugging  
Debugging jnlp-loader applications
Featured
Updated Dec 6, 2009 by john.douglas.pritchard

Example

In this page, we'll debug the Gears demo in Fv3Tk.

Setup

Install JSwat by Nathan Fieldler.
Svn checkout Fv3Tk.

Attach

In the fv3tk directory, run ant to build.
Start JSwat.
Configure a session in JSwat for classes including fv3tk/*.jar, and sources including fv3tk/src and fv3tk/gears.
Start the application from the command line using
 java -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,address=8000 -jar fv3tk-gears-loader-0.0.1.jar
Attach JSwat to the running process using port 8000 in the Jswat / Attach dialog.

Run

An alternative way to debug loader applications is to configure JSwat with the gears-loader jar, and then to call loader.Main from JSwat.

Objective

Properly loading and running a jnlp-loader application requires that loader.Main be contained in a classpath that includes only the loader classes and its main.jnlp pointing to the application classes.
If the loader is started with the application in classpath, the extension classes will fail to resolve via the loader, but will resolve in the bootstrap class loader which doesn't know how to find resources and libraries.

Sign in to add a comment
Powered by Google Project Hosting