今天我使用“apt-get install scala”安装了 scala,并确认 scala jar 文件位于/usr/share/java
您应该能够将其设置SCALA_HOME
为/usr/share/java
并使其全部正常工作。我假设您想使用 NetBeans,因此您需要在 .profile(或 .bash_profile)中而不是在 .bashrc 中设置 SCALA_HOME,因为除非您从命令行启动,否则 NetBeans 不会看到 .bashrc 中设置的任何变量
$ find / -maxdepth 6 -iname \*scala\*jar 2> /dev/null
/usr/share/java/scala-dbc.jar
/usr/share/java/scala-partest.jar
/usr/share/java/scala-partest-2.9.1.jar
/usr/share/java/scala-dbc-2.9.1.jar
/usr/share/java/scalacheck.jar
/usr/share/java/scalap.jar
/usr/share/java/scala-library-2.9.1.jar
/usr/share/java/scala-compiler-2.9.1.jar
/usr/share/java/scala-library.jar
/usr/share/java/scalacheck-2.9.1.jar
/usr/share/java/scala-compiler.jar
/usr/share/java/scala-swing-2.9.1.jar
/usr/share/java/scalap-2.9.1.jar
/usr/share/java/scala-swing.jar