This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ow to verify class files compiled with debugging enabled