隨筆-314  評論-209  文章-0  trackbacks-0

          轉(zhuǎn)自:

          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”,無法進行調(diào)試。

           

          遇到這個錯誤時找到的解答方案匯總:

          1、修改Eclipse的java編譯器使用jdk,而不是jre;
          2、使用Ant編譯時,未打開debug開關(guān),在寫javac 任務(wù)時,設(shè)置debug="true",否則不能調(diào)試。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、編譯器的設(shè)置問題,window->preferences->java->Compiler在compiler起始頁,classfile Generation區(qū)域中確認已經(jīng)勾選了All line number attributes to generated class files。如果已經(jīng)勾選,從新來一下再Apply一下。或者從項目層次進行設(shè)定,項目屬性->java compiler同樣在起始頁,確定已經(jīng)勾選。

           

           

          Eclipse編譯時出現(xiàn)Outof Memory問題,解決辦法如下:

          window->preferences->java->Installed JREs,選擇安裝的jre(如jdk1.5.0),單擊右邊按鈕“Edit”,彈出“Edit JRE”的對話框,在Default VM Argument的輸入框中輸入:-Xmx512m,然后按確定,即可。(-Xms是設(shè)定最小內(nèi)存,-Xmx是設(shè)定最大內(nèi)存)

          posted on 2015-11-26 15:56 xzc 閱讀(765) 評論(0)  編輯  收藏 所屬分類: Eclipse

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


          網(wǎng)站導航:
           
          主站蜘蛛池模板: 临海市| 仁布县| 黔江区| 仙居县| 庄河市| 陇川县| 布尔津县| 翁源县| 东丰县| 尚志市| 上杭县| 田东县| 独山县| 禹城市| 婺源县| 冷水江市| 康马县| 丹凤县| 潮安县| 兰溪市| 福州市| 荣成市| 行唐县| 合山市| 闵行区| 搜索| 互助| 连城县| 宣汉县| 北京市| 永修县| 车险| 南京市| 西林县| 喀什市| 朔州市| 高州市| 潮安县| 宝鸡市| 正安县| 榕江县|