Skip to main content

Debugging JNLP applets?

3 replies [Last post]
kazssym
Offline
Joined: 2007-04-18
Points: 0

I am writing an applets that uses JNLP API and want to debug it in NetBeans IDE. Is there any way to debug applets launched by Java Web Start easily?

For normal applets, I can use the applet viewer for debugging, but because my applet uses JNLP API, I cannot use it. Since my applet is also designed as a draggable applet for upcoming Java 6 Update 10, I cannot rewrite it to a normal application either. I wish the javaws command would accept debug options!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kazssym
Offline
Joined: 2007-04-18
Points: 0

I finally figured out how. When running the javaws launcher, I have to pass -J-agentlib:jdwp=... option to the command.

Thanks.

mbien
Offline
Joined: 2007-04-29
Points: 0

you could try to attach the debugger via process id (I never tried it but it should work with java 6).

1. start your app
2. find the pid with e.g Visual VM
3. use Attach debugger... in NetBeans and attach to the pid

kazssym
Offline
Joined: 2007-04-18
Points: 0

How can I make Java Web Start wait a debugger attaching before starting the applet code?