Usage: sdk <command> [candidate] [version]
sdk offline <enable|disable>
commands:
install or i <candidate> [version] [local-path]
uninstall or rm <candidate> <version>
list or ls [candidate]
use or u <candidate> <version>
default or d <candidate> [version]
home or h <candidate> <version>
env or e [init]
current or c [candidate]
upgrade or ug [candidate]
version or v
broadcast or b
help
offline [enable|disable]
selfupdate [force]
update
flush [archives|tmp|broadcast|version]
candidate : the SDK to install: groovy, scala, grails, gradle, kotlin, etc.
use list command for comprehensive list of candidates
eg: $ sdk list
version : where optional, defaults to latest stable if not provided
eg: $ sdk install groovy
local-path : optional path to an existing local installation
eg: $ sdk install groovy 2.4.13-local /opt/groovy-2.4.13
sbtシェルからscalaシェルへ
$ sbt console
scala>
またはsbtにてsbtシェル起動後consoleコマンドを入力
$ sbt
[info] welcome to sbt 1.3.13 (AdoptOpenJDK Java 11.0.9.1)
[info] loading global plugins from /home/takanobu/.sbt/1.0/plugins
[info] loading settings for project chapter-cluster-build from plugins.sbt ...
[info] loading project definition from /home/takanobu/IdeaProjects/akka-in-action/chapter-cluster/project
[info] loading settings for project chapter-cluster from scala.sbt,build.sbt ...
[info] set current project to words-cluster (in build file:/home/takanobu/IdeaProjects/akka-in-action/chapter-cluster/)
[info] sbt server started at local:///home/takanobu/.sbt/1.0/server/540c81ed307cf8174db4/sock
sbt:words-cluster> console
[info] Compiling 6 Scala sources to /home/takanobu/IdeaProjects/akka-in-action/chapter-cluster/target/scala-2.13/classes ...
[info] Non-compiled module 'compiler-bridge_2.13' for Scala 2.13.4. Compiling...
[info] Compilation completed in 18.928s.
[info] Starting scala interpreter...
Welcome to Scala 2.13.4 (OpenJDK 64-Bit Server VM, Java 11.0.9.1).
Type in expressions for evaluation. Or try :help.
scala>
sbt:akka-grpc-quickstart-scala> run
Multiple main classes detected. Select one to run:
[1] com.example.helloworld.GreeterClient
[2] com.example.helloworld.GreeterServer
Enter number: 1
[info] running com.example.helloworld.GreeterClient
......
runMain
予めメイン関数を含むオブジェクトを指定して起動
sbt:akka-grpc-quickstart-scala> runMain com.example.helloworld.GreeterServer
[info] running com.example.helloworld.GreeterServer
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
(gRPC server bound to {}:{},127.0.0.1,8080)
reStart — starts your application in a forked JVM. The optionally specified (JVM) arguments are appended to the ones configured via the reStartArgs/ reStart::javaOptions setting (see the “Configuration” section below). If the application is already running it is first stopped before being restarted.
reStop stops application. This is done by simply force-killing the forked JVM. Note, that this means that shutdown hooks are not run (see #20).
reStatus shows an informational message about the current running state of the application.
compile
Compiles the main sources (in the src/main/scala directory). test:compile compiles test sources (in the src/test/scala/ directory).
console
Starts the Scala interpreter with a classpath including the compiled sources, all jars in the lib directory, and managed libraries. To return to sbt, type :quit, Ctrl+D (Unix), or Ctrl+Z (Windows). Similarly, test:console starts the interpreter with the test classes and classpath.
package
Creates a jar file containing the files in src/main/resources and the classes compiled from src/main/scala. test:package creates a jar containing the files in src/test/resources and the class compiled from src/test/scala.
packageSrc
Creates a jar file containing all main source files and resources. The packaged paths are relative to src/main/scala and src/main/resources. Similarly, test:packageSrc operates on test source files and resources.
run<argument>
Runs the main class for the project in the same virtual machine as sbt. The main class is passed the arguments provided. Please see Running Project Code for details on the use of System.exit and multithreading (including GUIs) in code run by this action. test:run runs a main class in the test code.
runMain<main-class> <argument>
Runs the specified main class for the project in the same virtual machine as sbt. The main class is passed the arguments provided. Please see Running Project Code for details on the use of System.exit and multithreading (including GUIs) in code run by this action. test:runMain runs the specified main class in the test code.