Eclipse启动 org.eclipse.swt.SWTException: Invalid thread access问题解决方法

     最近使用eclipse的时候,当选择完workspace之后,eclipse开始加载启动,在这个阶段经常出现闪退出的情况。

    看到日志文件提示一下内容:

    

org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:4441)
	at org.eclipse.swt.SWT.error(SWT.java:4356)
	at org.eclipse.swt.SWT.error(SWT.java:4327)
	at org.eclipse.swt.widgets.Display.error(Display.java:1258)
	at org.eclipse.swt.widgets.Display.checkDevice(Display.java:764)
	at org.eclipse.swt.widgets.Display.addListener(Display.java:626)
	at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.<init>(IDEWorkbenchAdvisor.java:177)
	at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.<init>(IDEWorkbenchAdvisor.java:185)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:136)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
     从网上找了一个方法:启动时给eclipse加一个 -clean,什么意思?

     最简单的办法就是在安装目录下找到eclipse.exe,创建快捷方式,右键快捷方式,在目标路径下添加 “ -clean”;

      如下图

                                 

  最后通过快捷方式即可成功运行eclipse!

        这个问题出现过很多次,每次都让我重新建workspace,今天小编怒了,动手找了下方法,方便了自己,也分享给大家!


评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值