Automatically convert Scala code to Java code

Jus12 picture Jus12 · Mar 27, 2012 · Viewed 42.2k times · Source

I have an app written in Scala and some of my team members want a Java version of it. It is a demo app to use another API written in Scala, and they want a Java version of the app to be able to use the API from Java. However, the app is somewhat large and I don't want to manually rewerite in Java (and they don't want to learn Scala). Is there any tool that will automatically generate (readable) Java code from the Scala code?

Answer

dhg picture dhg · Mar 27, 2012

they want a Java version of the app to be able to use the API from Java

Scala classes are usable from Java (since it's all JVM bytecode in the end). Can you just package a jar with your classes for them to use?