This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Java in General and the fly likes Compile with Debug and with No Debug Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Compile with Debug and with No Debug" Watch "Compile with Debug and with No Debug" New topic
Author

Compile with Debug and with No Debug

sopal Pal
Ranch Hand

Joined: Aug 04, 2003
Posts: 83
Hi
If I compile a Class with Debug turned ON the size of the class file is larger than when I compile the class with NO Debug info.

Does this also mean - when a class compiled with Debug info - is loaded into the JVM - it takes that much more memory than its counterpart class - which is compiled with NO Debug.

Any help would be appreciated.
Thanks
Sumit


SCEA, SCBCD, SCJP1.4, OOAD-UML, OCP 9i
Ronnie Ho
Ranch Hand

Joined: Aug 10, 2005
Posts: 47
Originally posted by sopal Pal:
Hi
If I compile a Class with Debug turned ON the size of the class file is larger than when I compile the class with NO Debug info.

Does this also mean - when a class compiled with Debug info - is loaded into the JVM - it takes that much more memory than its counterpart class - which is compiled with NO Debug.


JVM doesn't load all the code from the class file into memory just when you start up the program. So you cannot measure it this way.
Tony William
Ranch Hand

Joined: Jun 27, 2005
Posts: 54
Can someone then let us know what is the difference in using a class file that is compiled with Debug and with no debug? What I mean is the impact to the runtime environment.


MCP, MCP+I, MCSE(NT4), MCSE+I, MCSE(2000), MCDBA, MCSD(VS6)<br />SCJP 5.0, SCBCD 1.3<br />ICED(v5.0), ICSD (WSP5.0)
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24189
    
  34

None whatsoever. The debugging info is some tables that are put into the .class file. The normal runtime JVM won't even load this data in -- only a debugger will.


[Jess in Action][AskingGoodQuestions]
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Compile with Debug and with No Debug