Search This Blog

Friday, December 04, 2009

How do you find whether a Java file is compiled with the debugging info or not

Open the file using the JD-GUI utility
http://java.decompiler.free.fr/?q=jdgui
Click on a particular .class file , after this go to the menu option
Navigate -> Go to Line option
If this option is not grayed out then that particular jar file has the debug info included.
To find the line info you can also use the following
javap -l SearchJars
This will display LineNumberTable
LineNumberTable:
line 13: 0
line 14: 16
line 15: 27
If this comes up then that means the debugging info is included in to the class file.