报错:org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:4517)

时间:2021-01-16 21:00:30

在Mars、Kepler的版本裡,時常會出現以下錯誤導致eclipse無法進行運作

报错:org.eclipse.swt.SWTError: No more handles 	at org.eclipse.swt.SWT.error(SWT.java:4517)

Error.log
org.eclipse.swt.SWTError: No more handles
    at org.eclipse.swt.SWT.error(SWT.java:4517)
    at org.eclipse.swt.SWT.error(SWT.java:4406)
    at org.eclipse.swt.SWT.error(SWT.java:4377)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:482)
    at org.eclipse.swt.widgets.Control.createHandle(Control.java:703)
    at org.eclipse.swt.widgets.Label.createHandle(Label.java:199)
    at org.eclipse.swt.widgets.Control.createWidget(Control.java:743)
    ...
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

我們可以安裝WindowBuilder plugin來解決此問題。

WindowBuilder

URL:http://download.eclipse.org/windowbuilder/WB/integration/4.5/

Location:http://download.eclipse.org/windowbuilder/WB/integration/4.5/

Step1. Help -> Install  New Software... 安裝WindowBuilder plugin

Step2. 進入Window -> Perferences

Step3. General -> Editors -> File Associations

Step4. 選擇*.java,預設使用WindowBuilder Editor開啟

报错:org.eclipse.swt.SWTError: No more handles 	at org.eclipse.swt.SWT.error(SWT.java:4517)

Reference