snippetbashTip
scala — Scala application launcher and interactive interpreter. More information: <https://scala-cli.virtusl
Viewed 0 times
commandlauncherandscalacliinteractiveapplication
Problem
How to use the
scala command: Scala application launcher and interactive interpreter. More information: <https://scala-cli.virtuslab.org/docs/reference/cli-options/>.Solution
scala — Scala application launcher and interactive interpreter. More information: <https://scala-cli.virtuslab.org/docs/reference/cli-options/>.Start a REPL (interactive shell):
scalaStart the interpreter with a dependency in the [c]lass[p]ath:
scala {{[-cp|--extra-jars]}} {{filename.jar}} {{command}}Execute a Scala script:
scala {{script.scala}}Execute a
.jar program:scala {{filename.jar}}Execute a single Scala command:
scala {{[-e|--execute-script]}} {{command}}Code Snippets
Start a REPL (interactive shell)
scalaStart the interpreter with a dependency in the [c]lass[p]ath
scala {{[-cp|--extra-jars]}} {{filename.jar}} {{command}}Execute a Scala script
scala {{script.scala}}Execute a `.jar` program
scala {{filename.jar}}Execute a single Scala command
scala {{[-e|--execute-script]}} {{command}}Context
tldr-pages: common/scala
Revisions (0)
No revisions yet.