scala 실행

scala 2016. 3. 16. 09:33

  hello.scala 내용:  println(" Hello world")


1. hello.scala와 같은 script 작성 후  


$ scala hello.scala 로 실행 .



2. class나 object .scala작성후


$scalac co.scala

$scala co   

하면 되는데


scalac 보다 빠른 fsc (fast scala compiler)가 존재한다.

차이점은 fsc는 항상 메모리에 띄워 놓고, scalac은 JVM을 그 때 그때 띄우게 되는데..

따라서 fsc를 죽이고 싶다면 

$ fsc co.scala

$ scala co 

$ fsc - shutdown  으로 죽이면 된다.

Posted by yongary
,