0

I tried to embed SBT by creating a new SBT program and adding sbt-launcher.jar to the lib directory.

package testapp

import xsbt.boot._

object TestMain extends App {
  Boot.main(new Array[String](0))
}

However this fails to run with the following error.

Exception in thread "main" java.lang.IncompatibleClassChangeError: Expected static method scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps;
    at xsbt.boot.Boot$.main(Boot.scala:11)
    at xsbt.boot.Boot.main(Boot.scala)
    at testapp.TestMain$.delayedEndpoint$testapp$TestMain$1(TestMain.scala:15)
    at testapp.TestMain$delayedInit$body.apply(TestMain.scala:14)
    at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App$$anonfun$main$1.apply(App.scala:76)
    at scala.App$$anonfun$main$1.apply(App.scala:76)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
    at scala.App$class.main(App.scala:76)
    at testapp.TestMain$.main(TestMain.scala:14)
    at testapp.TestMain.main(TestMain.scala)
Phil
  • 46,436
  • 33
  • 110
  • 175

0 Answers0