隨筆-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 閱讀(762) 評論(0)  編輯  收藏 所屬分類: Eclipse

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 镇坪县| 扶余县| 斗六市| 肇庆市| 平度市| 东港市| 会同县| 碌曲县| 无为县| 南江县| 福泉市| 徐水县| 邯郸市| 济阳县| 高安市| 体育| 托克逊县| 阿尔山市| 疏勒县| 阿鲁科尔沁旗| 石狮市| 芦溪县| 浦江县| 如东县| 左权县| 璧山县| 鄄城县| 沧州市| 金塔县| 卢湾区| 大理市| 兰溪市| 天峨县| 双城市| 双流县| 库尔勒市| 沅陵县| 华坪县| 民和| 无为县| 厦门市|