Skip to content
Advertisement

Can java run a compiled scala code?

Can command java run a compiled scala code? If so, why do we have an exclusive command scala?

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement