Intellij Ultimate Edition不适用于Amazon Corretto 11 JDK

时间:2019-06-20 08:18:28

标签: java intellij-idea

我当时使用的是aws corretto 11 JDK来构建我的项目,但是随后在运行时我遇到了这个异常。

  

java.lang.UnsupportedClassVersionError:   co / paralleluniverse / strands / SuspendableRunnable已由   Java Runtime的最新版本(类文件版本54.0),   此版本的Java Runtime仅识别类文件版本   高达52.0

经过一番谷歌搜索,我发现当我仅使用intellij运行此代码时,默认情况下使用JDK 8运行我的代码,这就是我无法运行我的项目的原因。

然后,我将intellij更改为使用相同的JDK 11来运行代码,但是在此之后intellij本身还没有启动,请告诉我如何解决此问题。

2019-06-20 13:54:52,498 [   5359]   INFO - til.net.ssl.CertificateManager - Default SSL context initialized
2019-06-20 13:54:52,516 [   5377]   WARN - com.intellij.util.xmlb.Binding - no accessors for interface com.intellij.openapi.extensions.PluginDescriptor
2019-06-20 13:54:52,524 [   5385]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342
2019-06-20 13:54:52,572 [   5433]   WARN - j.ide.MacOSApplicationProvider - com/apple/eawt/AppEvent$AboutEvent
java.lang.NoClassDefFoundError: com/apple/eawt/AppEvent$AboutEvent
        at com.intellij.ide.MacOSApplicationProvider$Worker.initMacApplication(MacOSApplicationProvider.java:101)
        at com.intellij.ide.MacOSApplicationProvider.<init>(MacOSApplicationProvider.java:70)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
        at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:92)
        at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:66)
        at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:48)
        at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:458)
        at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:104)
        at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$9(ApplicationImpl.java:449)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
        at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:473)
        at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:88)
        at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:407)
        at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:393)
        at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:208)
        at com.intellij.idea.IdeaApplication.lambda$initApplication$0(IdeaApplication.java:74)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:347)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: com.apple.eawt.AppEvent$AboutEvent
        at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:257)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 38 more
2019-06-20 13:54:52,606 [   5467]   INFO - gs.impl.UpdateCheckerComponent - channel: release
2019-06-20 13:54:52,640 [   5501]   INFO - tellij.ide.SystemHealthMonitor - issue detected: bundled.jre.version.message
2019-06-20 13:54:52,866 [   5727]   INFO - il.indexing.FileBasedIndexImpl - Index exts enumerated:198, number of extensions:85
2019-06-20 13:54:52,877 [   5738]   INFO - il.indexing.FileBasedIndexImpl - Index scheduled:10
2019-06-20 13:54:52,934 [   5795]   INFO - tellij.psi.stubs.StubIndexImpl - All stub exts enumerated:41, number of extensions:126
2019-06-20 13:54:52,9

编辑:删除建议的文件后,它工作正常,并且还更新了错误消息。

1 个答案:

答案 0 :(得分:2)

到目前为止,Amazon corretto JDK可能与IntelliJ不兼容,如果您想查看为什么IntelliJ无法正常工作,则需要检查IntelliJ的日志,请参阅this文档关于如何在不同操作系统上查找IntelliJ的日志和其他重要位置的信息。

此外,根据this官方文档,IntelliJ建议删除该文件,在该文件中捕获已更改的JDK路径信息。

  

所选位置存储在idea.config.path \ .jdk中   文件,如果需要恢复到默认行为   问题(例如IDE不再启动时),请删除此文件或进行修改   里面的安装路径。