eclipse无法创建工作区的问题(解决方案)

在创建工作区的时候,有人出现了这样的问题

eclipse无法创建工作区的问题(解决方案)_第1张图片



打开Eclipse的日志文件查看,发现输出了如下的错误信息:
---------------------------------------------------------------------------------------------------
!SESSION 2017-10-05 14:36:12.320 -----------------------------------------------
eclipse.buildId=4.4.2.M20150204-1700
java.version=9
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product


!ENTRY org.eclipse.osgi 4 0 2017-10-05 14:36:18.913
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/w3c/dom/stylesheets/StyleSheet
at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngineManager.getCSSSWTEngine(ThemeEngineManager.
at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngineManager.getEngineForDisplay(ThemeEngineManager.
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createThemeEngine(PartRenderingEngine.
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.initializeStyling(PartRenderingEngine.
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.
at org.eclipse.ui.internal.Workbench$5.run(Workbench.
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
at
at
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.
at org.eclipse.equinox.launcher.Main.basicRun(Main.
at org.eclipse.equinox.launcher.Main.run(Main.
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.stylesheets.StyleSheet cannot be found by org.eclipse.e4.ui.css.core_0.10.100.v20140424-2042
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.
at
... 25 more
---------------------------------------------------------------------------------------------------



运行cmd,查看一下Java版本,输入java -version



Java 9版本的同学到含有eclipse.exe的文件路径下面找到eclipse.ini

eclipse无法创建工作区的问题(解决方案)_第2张图片



用记事本打开,加上--add-modules=ALL-SYSTEM,保存即可

你可能感兴趣的:(Java,解决方案,工作,Java,eclipse)