1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/scala.md

25 lines
456 B
Markdown
Raw Normal View History

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.
> More information: <https://scala-lang.org>.
2017-12-05 10:04:46 -08:00
- Start a REPL (interactive shell):
2017-12-05 10:04:46 -08:00
`scala`
- 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}}`
- Execute a `.jar` program:
2017-12-05 10:04:46 -08:00
`scala {{filename.jar}}`
- Execute a single Scala command in the command-line:
2017-12-05 10:04:46 -08:00
`scala -e {{command}}`