views:

33

answers:

2

I have a executable jar with source compiled in and I want to debug it using jdb (no other debugger available in this environment unfortunately).

I am able to debug it with

jdb -classpath "${JAR_FILE}:${CLASS_PATH}" ${MAIN_CLASS} ${ARGS}

How can I get jdb to use the source that is built into the jar file?

Notes: Java 6, AIX, ksh

A: 

Haven't tried this personally, but perhaps the sourcepath option will allow JAR files: jdb -sourcepath ${JAR_FILE} ...

kschneid
A: 

It may not be possible, as stated in this (very old) post on the forums.

C. Ross
Nice. Source code for jdb appears to explicitly ignore *.jar and *.zip entries for `sourcepath`.
kschneid
@kschneid, Thanks for checking. Stick around, we need more like you.
C. Ross