sbt
をインストールして、Scalaバージョン2.8をUbuntuで使用することを試みました。 (私は現在、バージョン2.7を使用しています。)Ubuntuでsbtを実行しようとしています。 (エラー:java.lang.NoClassDefFoundError:scala/ScalaObject)
私は次の出力を得る端子からsbt
実行します。私は間違って何をやってる
$ sbt
Project does not exist, create new project? (y/N/s) y
Name: HelloWorld
Organization: org
Version [1.0]:
Scala version [2.7.7]:
sbt version [0.7.4]:
Getting Scala 2.7.7 ...
:: retrieving :: org.scala-tools.sbt#boot-scala
confs: [default]
2 artifacts copied, 0 already retrieved (6214kB/279ms)
java.lang.NoClassDefFoundError: scala/ScalaObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at xsbt.boot.Provider$.classMissing$1(Provider.scala:71)
at xsbt.boot.Provider$$anonfun$getMissing$1.apply(Provider.scala:72)
at xsbt.boot.Provider$$anonfun$getMissing$1.apply(Provider.scala:72)
at scala.List.filter(List.scala:859)
at xsbt.boot.Provider$.getMissing(Provider.scala:72)
at xsbt.boot.Provider$initialize.call(Provider.scala:45)
at xsbt.boot.Provider$initialize.call(Provider.scala:32)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
at xsbt.boot.Using$.withResource(Using.scala:11)
at xsbt.boot.Using$.apply(Using.scala:10)
at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
at xsbt.boot.Locks$.apply(Locks.scala:31)
at xsbt.boot.Provider$class.$init$(Provider.scala:31)
at xsbt.boot.Launch$ScalaProvider.<init>(Launch.scala:80)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:72)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:72)
at xsbt.boot.Cache.newEntry(Cache.scala:17)
at xsbt.boot.Cache.getFromReference(Cache.scala:13)
at xsbt.boot.Cache.apply(Cache.scala:12)
at xsbt.boot.Launch.getScala(Launch.scala:73)
at xsbt.boot.Launch$.run(Launch.scala:48)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$.launch(Launch.scala:57)
at xsbt.boot.Launch$.explicit(Launch.scala:42)
at xsbt.boot.Launch$.initialized(Launch.scala:38)
at xsbt.boot.Launch$.parsed(Launch.scala:31)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 62 more
Error during sbt execution: java.lang.NoClassDefFoundError: scala/ScalaObject
任意のアイデア?
で説明したように、あなたの 'sbt'スクリプトを定義した方法を追加してください
~/.m2/repository
~/.ivy2/cache
project/boot
を、確実にそのjarファイルは 'sbt'と同じディレクトリの中にあります。 –