随笔-314  评论-209  文章-0  trackbacks-0

转自:

http://blog.csdn.net/caihaijiang/article/details/5903154

Eclipse下Debug时,弹出错误提示:“Unable to install breakpoint due to missing line number attributes. Modify compiler options to generate line number attributes”,无法进行调试。

 

遇到这个错误时找到的解答方案汇总:

1、修改Eclipse的java编译器使用jdk,而不是jre;
2、使用Ant编译时,未打开debug开关,在写javac 任务时,设置debug="true",否则不能调试。THe settings for the eclipse compiler don't affect the ant build and even if you launch the ant build from withineclipse. ant controls it's own compiler settings.you can tell ant to generate debugging info like this 'javac ... debug="true".../>;(我遇到的问题,是采用这个办法解决的)
3、编译器的设置问题,window->preferences->java->Compiler在compiler起始页,classfile Generation区域中确认已经勾选了All line number attributes to generated class files。如果已经勾选,从新来一下再Apply一下。或者从项目层次进行设定,项目属性->java compiler同样在起始页,确定已经勾选。

 

 

Eclipse编译时出现Outof Memory问题,解决办法如下:

window->preferences->java->Installed JREs,选择安装的jre(如jdk1.5.0),单击右边按钮“Edit”,弹出“Edit JRE”的对话框,在Default VM Argument的输入框中输入:-Xmx512m,然后按确定,即可。(-Xms是设定最小内存,-Xmx是设定最大内存)

posted on 2015-11-26 15:56 xzc 阅读(744) 评论(0)  编辑  收藏 所属分类: Eclipse

只有注册用户登录后才能发表评论。


网站导航: