java9을 설치하니 Spring Tool Suite가 동작이 되지 않는다. 


!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-10-20 19:29:56.365

!MESSAGE FrameworkEvent ERROR

!STACK 0

java.lang.NoClassDefFoundError: javax/annotation/PreDestroy

        at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:426)

        at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:154)

        at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:78)

        at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:111)

        at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)

        at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:176)

        at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.dispose(EclipseContextOSGi.java:106)

        at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.bundleChanged(EclipseContextOSGi.java:139)

        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:903)

        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)

        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:156)

        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)

        at org.eclipse.osgi.container.Module.doStop(Module.java:634)

        at org.eclipse.osgi.container.Module.stop(Module.java:498)

        at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:191)

        at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)

        at java.base/java.lang.Thread.run(Thread.java:844)

Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.0.v20160319-0612

        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:398)

        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:361)

        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:353)

        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)

        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)

        ... 21 more





STS.ini에서 -vmargs 라인을 찾고 다음을 추가한다.


-vmargs

--add-modules=java.se.ee



참고로 STS.ini 파일은 STS.app/Contents/Eclipse에 위치한다. 



Posted by '김용환'
,