0

Possible Duplicate:
How can I debug applications under Java Web Start (JNLP)?

I have a JWS application, that runs fine when I simply run it with Java Web Start, however when I try and debug it, using netbeans (jws-debug), it immediately exits.

If I run it as an application (without JWS) however, I'm able to debug it perfectly well.

How can I debug it as a JWS application?

Community
  • 1
  • 1
Varun Madiath
  • 3,152
  • 4
  • 30
  • 46
  • I always thought Java Webstart execution was close to identical with regular execution. – aioobe Jun 13 '11 at 07:24
  • So did I, but for some reason JWS debugging doesn't work. – Varun Madiath Jun 13 '11 at 07:26
  • 1
    Why do you want to debug it as "JWS" instead of as a normal application? – aioobe Jun 13 '11 at 07:26
  • 1
    note that javaws may decide to fork a new JVM for multiple reasons. enable java console to see exactly what happens. – Thorbjørn Ravn Andersen Jun 13 '11 at 07:27
  • @Varun Madiath: Agreed with Thorbjørn Ravn Andersen, run in console and see what you get. – Vern Jun 13 '11 at 07:35
  • aioobe - I've got to debug it as a JWS because I'm finding behaviour that is only triggered when the application is run through JWS. – Varun Madiath Jun 13 '11 at 09:01
  • @Thorbjørn Ravn Andersen I have the java console enabled, and when I run it as a normal application it appears displays all information. However that doesn't happen when I try and debug it. – Varun Madiath Jun 13 '11 at 09:02
  • @Thorbjørn Ravn Andersen - I think you're right about javaws forking a new JVM, because even when I run it normally, netbean says "build sucessful" before the application has finished. While it doesn't do this when I run it as a regular application. – Varun Madiath Jun 13 '11 at 09:04
  • @aioobe, the Java WebStart process is quite complex and includes e.g. a security manager. – Thorbjørn Ravn Andersen Jun 13 '11 at 09:16
  • @varun, how do you try to debug it and what exactly is listed in java console at trace level. – Thorbjørn Ravn Andersen Jun 13 '11 at 09:17
  • @Thorbjørn Ravn Andersen - I'm attempting to debug it by hitting the debug button in netbeans. I appended the following to the JVM arguments in the netbeans configuration dialog. `-verbose -J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=8200` – Varun Madiath Jun 13 '11 at 10:03

1 Answers1

0

I finaly ended up using the information on the accepted answer at this question. The trick was to stop attempting to debug the application as a local application, and instead to use the Netbeans remote debugger which ended up working quite well.

Community
  • 1
  • 1
Varun Madiath
  • 3,152
  • 4
  • 30
  • 46