TIDE
Languages

Scala

Installing Scala on Ubuntu in TIDE

Scala

Scala combines object-oriented and functional programming paradigms into a high-level, strongly typed language on the Java Virtual Machine (JVM).

Installation

Scala requires the Java Development Kit (JDK). You can install Scala using Ubuntu's package manager or via Coursier (cs), the official Scala installer.

Using APT

apt update
apt install -y default-jdk scala

Coursier manages Scala versions and build tools such as sbt:

curl -fLo cs https://git.io/coursier-cli-"$(uname | tr LD ld)"
chmod +x cs
./cs setup --yes
source ~/.profile

Verification

Check the installed Scala version:

scala -version

Writing and Compiling Code

Create a Scala file named Hello.scala:

object Hello {
    def main(args: Array[String]): Unit = {
        println("Hello, World!")
    }
}

Compile the program:

scalac Hello.scala

Run the compiled class:

scala Hello

Official Resources

On this page