我正在尝试编译Intellij IDEA
使用Scala 2.10
和需要编译的项目Java 7
。
我正在使用jenv
从命令行编译的工具(我已经安装了它的插件Intellij IDEA
以防万一)并且在我使用Java 7
并使用此行jenv
编译Maven
项目之后:
jenv exec mvn clean install
一切都很完美。
但是,当我使用Intellij IDEA
插件时Scala
,编译失败。我Java 1.7
在我发现的任何地方都设置了设置,in Scala Compiler Server
, in Java Compiler
,项目配置等。失败堆栈跟踪如下:
Error:scalac: Error: org/jetbrains/jps/incremental/messages/BuildMessage$Kind
java.lang.UnsupportedClassVersionError: org/jetbrains/jps/incremental/messages/BuildMessage$Kind
at org.jetbrains.jps.incremental.scala.local.AbstractCompiler$ClientReporter.log(AbstractCompiler.scala:92)
at xsbt.DelegatingReporter.info0(DelegatingReporter.scala:39)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply$mcV$sp(Reporter.scala:70)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply(Reporter.scala:70)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply(Reporter.scala:70)
at scala.tools.nsc.reporters.Reporter.withoutTruncating(Reporter.scala:42)
at scala.tools.nsc.reporters.Reporter.error(Reporter.scala:70)
at scala.tools.nsc.Global.globalError(Global.scala:228)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1564)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1552)
at scala.tools.nsc.Global$Run.compile(Global.scala:1661)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:115)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:94)
at xsbt.CompilerInterface.run(CompilerInterface.scala:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:32)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:68)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:25)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
据我了解,这意味着编译后的代码 java 版本与尝试运行它的版本不匹配。我还看到了为JetBrains
.
那么,有什么方法可以构建这个项目Intellij
吗?因为我坚持这一点,无法继续。