Java可以运行已编译的Scala代码吗? [英] Can java run a compiled scala code?
本文介绍了Java可以运行已编译的Scala代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
命令 java
是否可以运行已编译的Scala代码?如果是这样,为什么我们有一个专用命令 scala
?
Can command java
run a compiled scala code? If so, why do we have an exclusive command scala
?
推荐答案
如果包含Scala的所有必要运行时库(scala-library.jar,scala-swing.jar ...),则可以运行Scala生成的字节代码.在类路径中.scala命令自动执行此操作,并支持Scala特定于命令行的参数.
You can run byte code generated by Scala if you include all necessary runtime libs for Scala (scala-library.jar, scala-swing.jar ...) in the classpath. The scala command does this automatically, and supports Scala specific command line arguments.
这篇关于Java可以运行已编译的Scala代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文