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?)
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.
Joined: Feb 14, 2007
Thouge I understand verbose usage, but i tried -g option with/without, and found no difference in class file. Why is that so?
Joined: Mar 22, 2005
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.