简体   繁体   English

JDK 1.8无法导入sbt项目?

[英]can't import sbt project with JDK 1.8?

I want to import sbt project under Intellij 13.1. 我想在Intellij 13.1下导入sbt项目。

Current java version: 当前的Java版本:

nazar@lelyak-desktop:~⟫ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

During building project, I got error message: 在构建项目期间,出现错误消息:

在此处输入图片说明

Something is wrong with JDK 1.8? JDK 1.8出了点问题?

I can't finish importing the project. 我无法完成导入项目。

UPDATE: 更新:

I solved it by moving again to 1.7 version. 我通过再次移动到1.7版本解决了它。 It works fine. 工作正常。

Here is few tips about this issue Cannot build with sbt 这是有关此问题的一些技巧无法使用sbt构建

Any suggestions. 有什么建议么。

Looks like your SBT uses a Scala version that isn't compatible with Java 8 . 看起来您的SBT使用的Scala版本与Java 8不兼容 Try updating your SBT / Scala to a newer version and it should work again. 尝试将您的SBT / Scala更新到新版本 ,它应该可以再次使用。

I'm using sbt version 0.13.7 on Mac OS 10.10.2 with Java 1.8. 我在具有Java 1.8的Mac OS 10.10.2上使用sbt版本0.13.7。 I ran into the same problem and solved it with setting the 'java-home' option for sbt in the /usr/local/etc/sbtopts file. 我遇到了同样的问题,并通过在/ usr / local / etc / sbtopts文件中为sbt设置“ java-home”选项来解决。 Specifically, I added this line to /usr/local/etc/sbtopts: 具体来说,我将此行添加到/ usr / local / etc / sbtopts:

-java-home /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home

I did not need to change any sbt startup script or anything else. 我不需要更改任何sbt启动脚本或其他任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM