I'm want setup scala script by sbt ways according to document here.
A error encountered when execute
java -Dsbt.main.class=sbt.ScriptMain -Dsbt.boot.directory=/home/user/.sbt/boot -jar sbt-launch.jar "$@"
Error message:
Getting org.scala-sbt sbt 1.0.0 ...
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
69 artifacts copied, 0 already retrieved (21983kB/69ms)
Getting Scala 2.12.3 (for sbt)...
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
5 artifacts copied, 0 already retrieved (19004kB/48ms)
[error] java.lang.RuntimeException: No script file specified
[error] at scala.sys.package$.error(package.scala:27)
[error] at sbt.internal.Script$.$anonfun$command$3(Script.scala:24)
[error] at scala.Option.getOrElse(Option.scala:121)
[error] at sbt.internal.Script$.$anonfun$command$1(Script.scala:23)
[error] at sbt.Command$.$anonfun$command$2(Command.scala:79)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:121)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:228)
[error] at sbt.State$$anon$1.process(State.scala:234)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
[error] at sbt.MainLoop$.next(MainLoop.scala:105)
[error] at sbt.MainLoop$.run(MainLoop.scala:98)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76)
[error] at sbt.io.Using.apply(Using.scala:23)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:29)
[error] at sbt.StandardMain$.runManaged(Main.scala:104)
[error] at sbt.ScriptMain.run(Main.scala:82)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] No script file specified
[error] Use 'last' for the full log.
I'm not sure show does -Dsbt.main.class=sbt.ScriptMain
means.
This document is also confusing:
Duplicate your standard sbt script, which was set up according to Setup, as scalas and screpl (or whatever names you like).
What's the standard sbt script?
scalas is the script runner and should use sbt.ScriptMain as the main class
Where is sbt.ScriptMain
or how to define it?