Eclipse 的環境問題1

來源:互聯網
上載者:User

標籤:style   blog   http   color   io   使用   ar   java   strong   

最近在項目中老是遇到Eclipse 的環境問題今天統一解決記錄下來。

問題1:

 Resource is out of sync with the file system......


eclipse中檔案不同步引起的。在eclipse中,工程檔案是由eclipse自動掃描添加的,如果在外部修改了工程目錄中的檔案但又關閉了自動重新整理功能,則會引起檔案不同步,從而搜尋時出現Resource is out of sync with the file
system問題(其它功能可能也會如此)。此外,在外部沒有修改eclipse工程中的檔案也有可能引起該問題。


解決方案:

有兩種解決方案:

1)手動重新整理。即在eclipse的工程目錄中,右鍵refresh(或者按下F5)。

2)配置eclipse的選項:

    a)eclipse啟動時,重新整理workspace,即勾選:window—>preferences—>general—>startup and shutdown—>refresh workspace on startup;

    b)window—>preferences—>general—>workspace中:勾選選項:refresh using native hooks or polling和refresh on access;

 

 

問題2 。m2eclipse報錯"Unable to locate the Javac Compiler in:

maven package時總報錯: 

"Unable to locate the Javac Compiler in: D:\Program Files\Java\jdk1.7.0_60\..\lib\tools.jar"

方法一: 



  1. Window
    -> Preferences -> Java -> Installed
    JREs(如果列表中包含有效JRE忽略此步驟)。點擊"Add"按鈕,選擇預設的"Standard VM", 點擊"Next >",
    點擊"JRE home"右邊的"Directory"選擇檔案夾D:\Program
    Files\Java\jdk1.6.0_20\jre,一路“確定”。

  2. 回到"Installed JREs"介面,在剛添加的"jdk1.6.0_20"打上勾。 

  3. 開啟
    "Installed JREs" -> "Execution Environments", 點選介面左側的"J2SE-1.5",然後在右側點選"jdk1.6.0_20"

  4. 重啟Eclipse


方法二:


Windows->preferences->java->installed jREs ->中加上tools.jar




方法三:




  1. Windows->preferences->java->installed jREs,使用“Serach”尋找JRE

  2. 開啟 "Installed JREs" -> "Execution Environments", 點選介面左側的"J2SE-1.5",然後在右側點選你Search出來的JRE




參考URL:


http://alvinqq.iteye.com/blog/947506


http://blog.csdn.net/pengchua/article/details/2604911



Eclipse 的環境問題1

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.