scala(1)win7 Envirenment and Introduction

scala(1)win7 Envirenment and Introduction

1. build the envirenment
download the related files:
http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1.final-devel-docs.tgz
http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1.final-installer.jar
http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1.final.zip

download the latest eclipse
http://download.actuatechina.com/eclipse/technology/epp/downloads/release/indigo/SR1/eclipse-jee-indigo-SR1-win32-x86_64.zip

It is said that eclipse 3.7 is not perfect supported. I still try the latest plugin with latest eclipse:
http://download.scala-ide.org/releases-29/stable/site

Unzip the file scala-2.9.1.final.zip to directory D:\tool\scala-2.9.1.final.

Add SCALA_HOME to system configuration. Add D:\tool\scala-2.9.1.final\bin to path in system.

Verify the installation with this command.
>scalac -version
Scala compiler version 2.9.1.final -- Copyright 2002-2011, LAMP/EPFL

>scala
scala>1 + 2

2. Try the first example with hello world
create a textual file with name hello.scala, the content is as follow:
object HelloWorld{
def main(args: Array[String]){
println("Happy Valenten's Day, Kiko.")
}
}
D:\work\scala>scala hello.scala
Happy Valenten's Day, Kiko.

3. Try with my IDE eclipse 3.7
After install the scala plugin, I will create the first scala project named easyscala. Then create the package named com.sillycat.easyscala.

After that, create a scala object named Love under that package. The codes are like this, and we can run as scala application in eclipse:
package com.sillycat.easyscala

object Love {

def main(args: Array[String]) {
println("Happy Valenten's Day, Kiko.")
}

}

references:
http://www.scala-lang.org/
http://scala-ide.org/
http://scala-ide.org/download/current.html
http://www.scala-lang.org/node/310
http://willerce.com/post/windows-scala
http://www.oseye.net/kb/show/1945
http://www.scala-lang.org/downloads/distrib/files/website/doc/ProgrammingInScala.pdf
http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaReference.pdf
http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaOverview.pdf
http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaTutorial.pdf
http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaByExample.pdf
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值