After updating to Jdk9, eclipse cannot find a problem with the class inside the JDK (cannot start):
org.eclipse.e4.core.di.injectionexception: java.lang.noclassdeffounderror: javax/annotation/ Postconstruct at org.eclipse.e4.core.internal.di.injectorimpl.internalmake ( injectorimpl.java:410) at org.eclipse.e4.core.internal.di.injectorimpl.make ( injectorimpl.java:318) at Org.eclipse.e4.core.contexts.ContextInjectionFactory.make (contextinjectionfactory.java:162) at org.eclipse.e4.ui.internal.workbench.swt.e4application.createdefaultheadlesscontext ( e4application.java:491) at Org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext (e4application.java:505) at org.eclipse.e4.ui.internal.workbench.swt.e4application.createe4workbench ( e4application.java:204) at org.eclipse.ui.internal.workbench.lambda$3 ( workbench.java:614) at org.eclipse.core.databInding.observable.Realm.runWithDefault (realm.java:336) at Org.eclipse.ui.internal.Workbench.createAndRunWorkbench (workbench.java:594) at Org.eclipse.ui.PlatformUI.createAndRunWorkbench (platformui.java:148) at Org.eclipse.ui.internal.ide.application.IDEApplication.start (ideapplication.java:151) 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:388) at org.eclipse.core.runtime.adaptor.eclipsestarter.run (eclipsestarter.java:243) at Java.base/jdk.internal.reflect.nativemethodaccessorimpl.invoke0 (Native method) at java.base/jdk.internal.reflect.nativemethodaccessorimpl.invoke (nativemethodaccessorimpl.java:62) at java.base/jdk.internal.reflect.delegatingmethodaccessorimpl.invoke ( delegatingmethodaccessorimpl.java:43) at java.base/java.lang.reflect.method.invoke (method.java:564) at org.eclipse.equinox.launcher.main.invokeframework (Main.java : 653) at org.eclipse.equinox.launcher.main.basicrun (Main.java:590) at org.eclipse.equinox.launcher.main.run (main.java:1499) caused by: java.lang.noclassdeffounderror: javax/annotation/postconstruct at Org.eclipse.e4.core.internal.di.InjectorImpl.inject (injectorimpl.java:124) at Org.eclipse.e4.core.internal.di.InjectorImpl.internalMake (Injectorimpl.java:399) ... 22 moreCaused by: Java.lang.classnotfoundexception: javax.annotation.postconstruct cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418 at Org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal (bundleloader.java:433) At org.eclipse.osgi.internal.loader.bundleloader.findclass (bundleloader.java:395) At org.eclipse.osgi.internal.loader.bundleloader.findclass (bundleloader.java:387) At org.eclipse.osgi.internal.loader.moduleclassloader.loadclass (moduleclassloader.java:150) at java.base/java.lang.classloader.loadclass (classloader.java:496) 24 more
Workaround-Open:
F:\eclipse\eclipse\eclipse.ini
Add a line at the end of the file:
--add-modules=all-system
Start Eclipse again
This article is from "I am Back" blog, please be sure to keep this source http://12348890.blog.51cto.com/12338890/1983297
Workarounds that eclipse cannot start after upgrading JDK9