内部错误Java程序Intellij
执行java程序时出错。任何想法可能是什么问题。
Error:Internal error: (java.lang.IllegalArgumentException) No enum constant org.jetbrains.jps.model.java.LanguageLevel.JDK_1_9
java.lang.IllegalArgumentException: No enum constant org.jetbrains.jps.model.java.LanguageLevel.JDK_1_9
at java.lang.Enum.valueOf(Enum.java:238)
at org.jetbrains.jps.model.java.LanguageLevel.valueOf(LanguageLevel.java:21)
at org.jetbrains.jps.model.serialization.java.JpsJavaModelSerializerExtension$JavaProjectExtensionSerializer.loadExtension(JpsJavaModelSerializerExtension.java:285)
at org.jetbrains.jps.model.serialization.java.JpsJavaModelSerializerExtension$JavaProjectExtensionSerializer.loadExtension(JpsJavaModelSerializerExtension.java:268)
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(JpsLoaderBase.java:59)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.a(JpsProjectLoader.java:119)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:98)
at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:41)
at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:71)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:198)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
-
右键单击项目资源管理器的根目录并选择
Open Module Settings
(它位于我的计算机上菜单底部附近)。Project
在结果窗口中选择并查看您的sdk和语言级别。为项目sdk选择1.8,为语言级别选择8.0。