1. Installation
offical doc
down zip
- set env
Under Windows, you may set environment variables through the "Environment Variables" button on the
"Advanced" tab of the "System" control panel. Some versions of Windows provide this control panel through the
"Advanced System Settings" option inside the "System" control panel.
- name: SCALA_HOME
- value: E:\progFiles\sbt
2. Create the project
pull helloworld template
sbt new scala/hello-world.g8
rename project name
scala-demo1
file oper
see 我的第一个Scala程序
copy
MyExec.scala to
E:\tmpFiles\scala-project\scala-demo1\src\main\scala
MyClass.scala to
E:\tmpFiles\scala-project\scala-demo1\src\main\scala\com\example
delete
Main.scala
run
cd scala-demo1
sbt
sbt:hello-world>~run