wood burning stoves*
The moose likes Beginning Java and the fly likes ow to verify class files compiled with debugging enabled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ow to verify class files compiled with debugging enabled" Watch "ow to verify class files compiled with debugging enabled" New topic
Author

ow to verify class files compiled with debugging enabled

Robert Edmonston
Greenhorn

Joined: Aug 08, 2003
Posts: 11
Is there a way to verify if a given class file has been compiled with debugging symbols (besides trying to use it in a debugger and failing). Thanks!
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

The "javap" disassembler (in the JDK) can show you the local variable tables; if they're there, then the file was compiled -g. If they're not, then it wasn't.


[Jess in Action][AskingGoodQuestions]
Robert Edmonston
Greenhorn

Joined: Aug 08, 2003
Posts: 11
Thank you!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ow to verify class files compiled with debugging enabled