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 scalaUsing Coursier (Recommended)
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 ~/.profileVerification
Check the installed Scala version:
scala -versionWriting 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.scalaRun the compiled class:
scala Hello