2013-02-14 201 views
1

在過去的幾天裏,Eclipse一直在使用奇怪的操作,在啓動和創建Java項目時出現Eclipse錯誤

我注意到的第一件事是我最近創建的Java項目沒有從Eclipse內部運行。項目編譯時沒有任何錯誤,並且.class文件是從命令行創建並運行良好的,但是在Eclipse中觸發運行或調試按鈕根本沒有產生任何操作。舊項目將運行得很好。

然後錯誤開始顯現。

有時我得到這個錯誤在啓動時: start up error

每次我試圖創建一個新的Java項目時出現此錯誤: create java project error

這裏的日誌文件的開頭(這是我可以發佈更多,如果你問):

!SESSION 2013-02-14 09:11:35.296 ----------------------------------------------- 
eclipse.buildId=M20120914-1800 
java.version=1.7.0_13 
java.vendor=Oracle Corporation 
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US 
Command-line arguments: -os win32 -ws win32 -arch x86_64 

This is a continuation of log file C:\Documents and Settings\team\workspace.metadata\.bak_0.log 
Created Time: 2013-02-14 09:14:12.234 

!ENTRY org.eclipse.e4.ui.workbench 4 0 2013-02-14 09:14:12.234 
!MESSAGE Exception occurred while unrendering:[email protected]cb7 (elementId: org.eclipse.pde.runtime.LogView, tags: [View, categoryTag:General], contributorURI: null) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView, object: null, context: null, variables: [], label: Error Log, iconURI: platform:/plugin/org.eclipse.ui.views.log//icons/eview16/error_log.gif, tooltip: , dirty: false, closeable: true, description: null) 
!STACK 0 
org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException 
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63) 
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:859) 
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:839) 
at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:368) 
at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:127) 
at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:76) 
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:107) 
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:70) 
at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:170) 

我試圖啓動一個新的工作區沒有運氣。今天,我已經刪除了Java和Eclipse,並開始使用全新的Java JDK 7u13和新的Eclipse Juno 4.2.1,但沒有運氣。我不知道我在這裏做了什麼。任何想法是什麼導致這一點以及如何解決它?如果它很重要,我正在運行Windows XP Professional x64 Edition。

+0

我有時會在關機此錯誤: http://i.imgur.com/gHuclp4.jpg 網站不會讓我使用超過2個鏈接或把圖像直接在問題 – flight2039 2013-02-14 15:26:24

回答

1

我一直在使用64位版本的Java時遇到問題。值得嘗試一下32位安裝。

+0

下載現在 – flight2039 2013-02-14 15:37:33

+0

謝謝@tymeJV的簡單和簡單的修復。隨時瞭解漏洞,我的公司喜歡我們爲了安全起見讓我們的Java安裝保持最新,並且我必須安裝64位版本,因爲這是我的機器。回到工作後,一天和一半的我的頭撞在桌子:) – flight2039 2013-02-14 15:57:45

+0

沒問題,高興地幫助:) – tymeJV 2013-02-14 16:00:58

1

我有一個類似的問題,但出於不同的原因。它看起來像是一個32/64位的問題,因爲我有Windows 7 X64,我得到了eclipse x64和JDK1.7 X64,JRE1.6 x32已經安裝。 我最終發現我重新使用了我使用Google Android ADT Bundle創建的舊工作區目錄,該目錄是我幾周前安裝的,它不喜歡那樣。

所以我想我只是分享那個小塊。

+0

謝謝。建立一個新的工作區並將我的舊項目複製到它中解決了我的問題。 – Calon 2013-11-06 12:00:05

0

如果你有一個Windows x64不應該是Eclipse 64位的問題,你總是會安裝一個JDKx64。我建議你使用Eclipse 64位版本,因爲如果你有需要的項目,你可以分配更多的內存。