1、javac默认带了源文件属性和行号
2、加上-g可以生成局部变量
3、参考这篇文章:
http://www.softwareengineeringsolutions.com/thoughts/Java-Debug-Build.htm
以及
http://www.javalobby.org/java/forums/t19866.html
可以生成新的rt.jar,当然这是不全的,因此最好采用-Xbootclasspath/a:,放在最前面
也可以解压缩jdk的rt,然后覆盖,然后在重新生成。
(这个也行,放在 $jdk/jre/lib/ext/endorsed下面)
4、也可以下载fastdebug版本的JDK
5、也可以自己build jdk,这个我没尝试,周末实验一下。
51cto上的这篇文章写的相当不错,致敬:
http://lovespss.blog.51cto.com/1907593/535219
JavaEye上的
http://agapple.iteye.com/blog/1056599
这篇写的也很好