Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

About javac -g option  RSS feed

 
Rashid Mian
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any body tell me with example how to use -g option and -verbose option.
What are there uses using command line shell.
Infact as we people normally use GUI based IDE and we use breakpoints there for debugging, I am wondering if this breakpoints are also possible using command line javac( is this -g what for?)
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using "-g" will cause debugging information to be included in the class file, e.g. the real names of fields, and line number information.

You can find out easily what "-verbose" does by running the same program from the command line with and without it.
 
Rashid Mian
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thouge I understand verbose usage, but i tried -g option with/without, and found no difference in class file. Why is that so?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The debugging information in contained in the class file; it makes no difference to running the program. If you compare the files generated with and without the "-g" option you'll see that they differ.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!