Wednesday, June 29, 2005

How to debug JWS/JNLP

The easiest way found, that works since 1.5:

set JAVAWS_TRACE_NATIVE=1
set JAVAWS_VM_ARGS=-Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,
address=8989,server=y,suspend=n
javaws http://server:port/descriptor.jnlp

The JAVAWS_TRACE_NATIVE flag is optional, and its purpose is solely to show in a splash window the command that is being used to launch your JVM.

After this, you can attach your favourite IDE of choice.

5 comments:

  1. Thanks for the info. Helpful...

    ReplyDelete
  2. Where should i put these commands?
    In jnlp?

    ReplyDelete
  3. They should be executed in a normal DOS shell.

    ReplyDelete
  4. Great article about debugging, including applets: http://kaidokalda.blogspot.com/

    ReplyDelete
  5. set JAVAWS_VM_ARGS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8989,server=y,suspend=n"

    ReplyDelete

Something on your mind?

Note: Only a member of this blog may post a comment.