Scala环境搭建

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.
  1. name: SCALA_HOME
  2. 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

Reference

上一篇:流光溢彩按钮CSS


下一篇:2021年了,为什么还要学习Java?