...
The following describes how to remotely debug each of these phases.
Phase 1
This phase:
- extracts Extracts the jar to a temporary directory
- spawns Spawns a new process for Phase 2, referencing the temporary directory as the classpath; and
- 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:
- spawns Spawns a new process for Phase 3
- waits Waits for it to complete
- deletes Deletes the temporary directory containing the classes extracted in Phase 1
...
- Place a breakpoint in com.izforge.izpack.util.SelfModifier.main(String[] args)
- define Define the self.mod.debugPort2 property, which specifies the debug port to listen on
- Attach to the process in the debugger using socket transport, and the port above
...
- Place a breakpoint in com.izforge.izpack.util.SelfModifier.main(String[] args)
- define Define the self.mod.debugPort3 property, which specifies the debug port to listen on
- 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
...