Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

命令行下使用 Scala 命令编译 源文件,为什么没有在当前目录下看到编译之后的class文件????
求指点

scala版本 2.10.6


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
547 views
Welcome To Ask or Share your Answers For Others

1 Answer

scala命令加scala文件是用来执行脚本的,好像不会产生class文件。
用scalac命令会在当前目录生成class文件,如scalac Hello.scala,
然后可以用scala -classpath . Hello 或 scala -cp . Hello执行。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...