We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following describes how to remotely debug each of these phases.

Phase 1

This phase:

  1. extracts Extracts the jar to a temporary directory
  2. spawns Spawns a new process for Phase 2, referencing the temporary directory as the classpath; and
  3. exitsExits

Its invoked by running:

    java -jar MyApp/Uninstaller/uninstaller.jar

...

    java -jar -Xdebug -Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,suspend=y MyApp/Uninstaller/uninstaller.jar

Phase 2

This phase:

  1. spawns Spawns a new process for Phase 3
  2. waits Waits for it to complete
  3. deletes Deletes the temporary directory containing the classes extracted in Phase 1

...

  1. Place a breakpoint in  com.izforge.izpack.util.SelfModifier.main(String[] args)
  2. define Define the self.mod.debugPort2 property, which specifies the debug port to listen on
  3. Attach to the process in the debugger using socket transport, and the port above

...

  1. Place a breakpoint in  com.izforge.izpack.util.SelfModifier.main(String[] args)
  2. define Define the self.mod.debugPort3 property, which specifies the debug port to listen on
  3. Attach to the process in the debugger using socket transport, and the port above
E.g.:
java -jar -Dself.mod.debugPort3=8003 MyApp/Uninstaller/uninstaller.jar