Ubuntu: A Love/Hate Relationship: Adventures in Scala: Part I

Ubuntu: A Love/Hate Relationship: Adventures in Scala: Part I

May 20, 2008

 

Adventures in Scala: Part I

I am attempting to learn at least one new language a year and one of them this year is Scala. It is a multi-paradigm language that pretty much just takes Java and modernizes it. By that I mean it adds functional-style ways of doing things, like lambda statements, type inferencing, and gives it a much prettier syntax.

This article is about how to install Scala on Ubuntu. First off, you need Java installed. Scala programs compile to Java bytecode, which means you need the Java virtual machine in order to run your Scala programs. My advice is to install the sun-java6-jdk package. There are open-source Java implementations, but they suck. The Sun one is much better (the fact that it actually works is my main reason for using it).

Now the next step you might think is to then install the scala package from the Ubuntu repositories. Unfortunately as of today, that version is 2.3, and the most up-to-date one from the Scala pages is 2.7 (UPDATE Dec. 20/09: The version in the repo is 2.7.5 now, which is still not the latest version). You're much better off just doing this:
wget http://www.scala-lang.org/downloads/distrib/files/scala-2.7.7.final.tgz
tar -zxvf scala-2.7.7.final.tgz
sudo mv scala-2.7.7.final /usr/share/scala
sudo ln -s /usr/share/scala/bin/scala /usr/bin/scala
sudo ln -s /usr/share/scala/bin/scalac /usr/bin/scalac

Now you have a working Scala implementation! Make sure to check the most up-to-date version on their website. I'll try and keep this up-to-date, but I'm only human and only check the Scala website every now and then.

To uninstall:

sudo rm -rf /usr/share/scala /usr/bin/scala /usr/bin/scalac
posted on 2012-03-28 07:01  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/03/28/2420577.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值