![](/img/trans.png)
[英]ClassNotFoundException: org.eclipse.swt.widgets.Display
[英]Eclipse Kepler startup error “NoClassDefFoundError: org/eclipse/swt/widgets/Display”
我在Ubuntu 64位上使用Eclipse Kepler 64位和Sun JDK 1.7.0_25 64位。 當我使用JDK 1.6時Eclipse工作但在升級到JDK 1.7后停止工作(使用webupd8.org的方法和流行的askubuntu解決方案),現在在啟動時它告訴我有錯誤並檢查configuration/xxx.log
文件。
這是它在啟動時創建的每個日志文件內容的開頭:
!SESSION 2013-07-08 15:38:11.495 -----------------------------------------------
eclipse.buildId=4.3.0.I20130605-2000
java.version=1.7.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.equinox.ds 4 0 2013-07-08 15:38:12.212
!MESSAGE [SCR] Exception while activating instance org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngineManager@b1320f9 of component org.eclipse.e4.ui.css.swt.theme
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
at java.lang.Class.getDeclaredMethods(Class.java:1845)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.getMethod(ServiceComponent.java:126)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:213)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
我已清理工作區,運行./eclipse -clean
但它沒有通過徽標。 還有什么需要檢查/清理的嗎?
您需要在運行配置中為計算機包含正確的SWT插件。
1. Click Run -> Run Configurations... 2. Select the Run Configuration that is failing (on the left side) 3. Click the Plug-ins tab 4. In the "type filter text" box, type swt 5. Select the proper swt package for your machine. For me on OS X this was: org.eclipse.swt.cocoa.macosx.x86_64
然后正常運行它應該工作。
我無法弄清楚出了什么問題,但降級到Eclipse Juno工作了。
轉到eclipse快捷方式的屬性並添加-clean
參數。
“C:\\ Program Files(x86)\\ Eclipse \\ eclipse.exe” - 清潔
使用該快捷方式打開eclipse,然后再次刪除-clean
參數。
在Ubuntu中,你必須從你的終端運行eclipse並在最后添加-clean
。
我這樣做的方式是有效的,創造了一個新的工作空間而不是僅使用我的舊工作空間。 你試過嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.