mac os 安装配置scala

1、下载最新版scala,http://www.scala-lang.org/

2、在你希望的安装路径下解压tgz.

3、配置环境变量Scala_Home、和PATH:

    (1)进入终端你的scala解压路径下的bin目录;例如 jaycicledembp:~ jaycicle$ cd scala-2.11.7/bin

  (2)在bin目录下利用sudo进入vim编辑模式,修改配置文件profile:输入 sudo vim /etc/profile

    (3)在文件末尾加入相应的环境变量Scala_Home、和PATH。例如:在末尾添加如下两行    

      SCALA_HOME="/Users/jaycicle/scala-2.11.7"

      PATH="$PATH:/Users/jaycicle/scala-2.11.7/bin"

  (4)至此,配置成功,从新启动终端,输入scala如果出现如下:

      Welcome to Scala version 2.11.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_71).

        Type in expressions to have them evaluated.

        Type :help for more information.

       scala> 

恭喜你!成功开启scala之旅!

 

文章来自:http://www.cnblogs.com/jaycicle/p/4677458.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3