配置Scala环境

系统:Ubuntu Server 18.04

教程:http://www.runoob.com/scala/scala-tutorial.html

下载debian安装包:https://www.scala-lang.org/download/

sudo apt install openjdk-11-jdk-headless
sudo apt-get install ./scala-2.12.6.deb 

根据软连接找到路径,设置环境变量

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export SCALA_HOME=/usr/share/scala
alias s='scala'
alias sc='scalac'

打开shell:

groot@guardian:~$ scala
Welcome to Scala 2.12.6 (OpenJDK 64-Bit Server VM, Java 10.0.2).
Type in expressions for evaluation. Or try :help.

scala> 

安装成功。