mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
30 lines
605 B
Plaintext
30 lines
605 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# scala
|
|
|
|
> Scala application launcher and interactive interpreter.
|
|
> More information: <https://scala-cli.virtuslab.org/docs/reference/cli-options/>.
|
|
|
|
- Start a REPL (interactive shell):
|
|
|
|
`scala`
|
|
|
|
- Start 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}}`
|