小编use*_*976的帖子

在编译混合项目时,SBT给出"类文件有错误版本51.0,应该是49.0"吗?

编辑:各种SBT选项

show scalacOptions
List(-deprecation, -unchecked, -encoding, UTF-8, -Yinline-warnings, -feature)

show javaOptions
List()

about
[info] This is sbt 0.13.1
[info] The current project is {file:/Users/ThomasNorth/Documents/CODE/SERVER/MonetiseAlpha/monetise-webserver/}monetise-webserver 1.0.0-SNAPSHOT
[info] The current project is built against Scala 2.10.3
[info]
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.3
Run Code Online (Sandbox Code Playgroud)

我尝试使用一些Java源代码编译scala项目时收到以下错误,错误如下

[error] /Users/ThomasNorth/Documents/CODE/SERVER/MonetiseAlpha/monetise-webserver/src/main/java/com/boxbe/pub/email/EmailAddress.java:31: cannot access java.util.regex.Pattern
[error] bad class file: /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/rt.jar(java/util/regex/Pattern.class)
[error] class file has wrong version 51.0, should be 49.0
[error] Please remove or make sure it appears in the correct subdirectory of …
Run Code Online (Sandbox Code Playgroud)

scala javac sbt

5
推荐指数
1
解决办法
2801
查看次数

标签 统计

javac ×1

sbt ×1

scala ×1