eclipse遇到An error has occurred. See the log file

eclipse遇到An error has occurred. See the log file C:\workspace\.metadata\.log
 
log文件內容:
!ENTRY org.eclipse.core.resources 4 567 2012-03-18 00:29:35.775
!MESSAGE Could not read metadata for 'C:\workspace\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes\properties.index'.
!STACK 0
java.io.EOFException
    at java.io.DataInputStream.readByte(Unknown Source)
    at org.eclipse.core.internal.localstore.Bucket.load(Bucket.java:296)
 
!ENTRY org.eclipse.osgi 4 0 2012-03-18 00:29:37.681
!MESSAGE An error occurred while automatically activating bundle org.eclipse.jdt.core (314).
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.jdt.core.JavaCore.start() of bundle org.eclipse.jdt.core.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
 
解決方法:
1、刪除eclipse的臨時文件: eclipse\configuration 目錄下的 org.eclipse.osgi org.eclipse.update 兩個子目錄重新啓動 eclipse(沒用)
 
2、如果還是不行
將workspace中 項目做一下備份,刪除workspace目錄和上面兩個子目錄
再次啓動 eclipse,再導入備份的項目即可(沒試)
 
3.或者把環境變量path的C:\j2sdk1.6.0-03\bin的這個設定或 java_home的設定移動到path的最前面就可以。(沒用)
 
4.在windows命令行模式下進入eclipse目錄下,執行eclipse.exe -clean,這時候eclipse就可以啓動了,並且讓選擇workspace目錄。(沒用)
 
用另外一個版本打開該工作目錄也是打不開,確認不是eclipse問題,應該是工作目錄出問題了
5.刪除workspace目錄下.metadata,eclipse可以打開,重新建workspace
 
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章