有段时间没有使用eclipse了,今天有个项目要用,然后双击就出现了如下错误
打开错误日志
!SESSION 2019-10-01 16:18:20.650 ----------------------------------------------- eclipse.buildId=unknown java.version=1.7.0_72 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN Framework arguments: -product org.eclipse.epp.package.jee.product C:\Program Files (x86)\Java\jre7\bin 256M Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product C:\Program Files (x86)\Java\jre7\bin 256M !ENTRY org.eclipse.osgi 4 0 2019-10-01 16:18:21.225 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78) 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:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
解决办法
删除eclipse根目录下的configuration文件夹
然后新建config.ini文件
osgi.splashPath = platform:/base/plugins/org.eclipse.platform osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start eclipse.product=org.eclipse.sdk.ide osgi.instance.area.default=@user.home/workspace eof=eof
此时双击eclipse.exe,就好了