Alex Rivera | Logout

Check if Java bytecode contains debug symbols

Asked 2010-06-30T01:05:47.733
28

I would like to know how can I check if a compiled Java class contains debug symbols. The problem is that I compile an application from ant with debug="on", but a specific JVM throws an exception: it says that the debug symbols are missing.

Thanks.

Edit
Report

1 Answer

30

If you run javap -v on the class file, you will see the debug information that is present in the file.

It is worth compiling a simple test class with different -g option settings and looking at the results with javap.

If, you need to know exactly how javap presents the information, it is it is best for you to try it out in your Java installation. The output from the javap command may vary between different Java versions.

answered 2010-06-30T01:18:06.763

Your Answer