Files
tldr/pages.zh/common/scala.md

24 lines
432 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Scala
> Scala 应用程序启动器和交互式解释器。
> 更多信息:<https://scala-lang.org>。
- 启动 REPL交互式 shell
`scala`
- 在类路径中启动带有依赖的解释器:
`scala -classpath {{filename.jar}} {{command}}`
- 执行 Scala 脚本:
`scala {{script.scala}}`
- 执行 `.jar` 程序:
`scala {{filename.jar}}`
- 在命令行中执行单个 Scala 命令:
`scala -e {{command}}`