2017-12-05 10:05:46 -08:00
|
|
|
# scala
|
2017-12-05 10:04:46 -08:00
|
|
|
|
2017-12-05 10:11:22 -08:00
|
|
|
> Scala application launcher and interactive interpreter.
|
2019-05-23 11:56:50 +01:00
|
|
|
> More information: <https://scala-lang.org>.
|
2017-12-05 10:04:46 -08:00
|
|
|
|
2021-09-12 16:03:27 +02:00
|
|
|
- Start a REPL (interactive shell):
|
2017-12-05 10:04:46 -08:00
|
|
|
|
|
|
|
`scala`
|
|
|
|
|
2021-03-08 20:51:13 +00:00
|
|
|
- Start the interpreter with a dependency in the classpath:
|
|
|
|
|
|
|
|
`scala -classpath {{filename.jar}} {{command}}`
|
|
|
|
|
2017-12-06 08:40:15 -08:00
|
|
|
- Execute a Scala script:
|
2017-12-05 10:04:46 -08:00
|
|
|
|
|
|
|
`scala {{script.scala}}`
|
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- Execute a `.jar` program:
|
2017-12-05 10:04:46 -08:00
|
|
|
|
|
|
|
`scala {{filename.jar}}`
|
|
|
|
|
2021-05-20 16:13:41 -04:00
|
|
|
- Execute a single Scala command in the command-line:
|
2017-12-05 10:04:46 -08:00
|
|
|
|
|
|
|
`scala -e {{command}}`
|