Scala Installation Guide
This guide provides all the key information and getting-started instructions after a successful Scala installation via DeploySage-CLI.
Installation Information
Below are the details for your new Scala development environment.
| Item | Value |
|---|---|
| Scala Version | e.g., 3.4.2 |
| SBT Version | e.g., 1.9.9 |
| Java Dependency | OpenJDK 11+ |
| Environment File | /etc/profile.d/scala.sh |
Core Commands
Building Projects with SBT
You can start using the Scala compiler and build tool immediately after reloading your shell.
SBT (Simple Build Tool) is the standard for building Scala projects.
# Reload shell to apply environment changes
source /etc/profile.d/scala.sh
# Check versions
scala -version
sbt --version
# Start the Scala REPL (Read-Eval-Print Loop)
scala
# Compile and run a source file
scalac HelloWorld.scala
scala HelloWorld
# Create a new SBT project structure
sbt new scala/scala-seed.g8
# Compile your project
sbt compile
# Run your project's main class
sbt run
# Run tests
sbt test
# Enter the SBT interactive shell
sbt