我正在尝试了解 Scala/SBT 并正在浏览http://www.scala-sbt.org/0.13/docs/Hello.html http://www.scala-sbt.org/0.13/docs/Hello.html
第一步进展顺利...我有一个名为“hello”的目录,其结果为$ sbt new sbt/scala-seed.g8
in it.
在第二步“运行您的应用程序”中,轮子脱落了。
$ sbt
[info] Loading project definition from /Users/robert.kuhar/dev/Hello/project
[info] Set current project to Hello (in build file:/Users/robert.kuhar/dev/Hello/)
> run
[info] Compiling 1 Scala source to /Users/robert.kuhar/dev/Hello/target/scala-2.12/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.12.1. Compiling...
[info] Resolving org.scala-sbt#interface;0.13.13 ...
[trace] Stack trace suppressed: run last compile:compileIncremental for the full output.
[error] (compile:compileIncremental) java.lang.reflect.InvocationTargetException
[error] Total time: 1 s, completed Mar 9, 2017 3:34:03 PM
>
的输出run last compile:compileIncremental
对于新手来说是希腊语......
...
[info] Resolving org.scala-sbt#interface;0.13.13 ...
java.lang.VerifyError: Uninitialized object exists on backward branch 209
Exception Details:
Location:
scala/collection/immutable/HashMap$HashTrieMap.split()Lscala/collection/immutable/Seq; @249: goto
Reason:
Error exists in the bytecode
...
我偏离了轨道,在杂草丛中寻找线索。
我不知道这个版本的东西是否重要,但我是 OSX Sierra,带有 1.8 JDK 和 0.13.13 SBT。本机上有 Scala 2.12.1。
$ sbt sbtVersion
[info] Loading project definition from /Users/robert.kuhar/dev/Hello/project
[info] Set current project to Hello (in build file:/Users/robert.kuhar/dev/Hello/)
[info] 0.13.13
$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
$ scala -version
Scala code runner version 2.12.1 -- Copyright 2002-2016, LAMP/EPFL and Lightbend, Inc.
如何让“SBT Hello, World”在我的开发盒上运行?