Java – Can you mix the JVM languages? ie: Groovy & Clojure


I understand that you can easily mix groovy&java, clojure&java, whateverJvmLang&java.

Does this also mean I can have clojure and groovy code interact as well? If I use Grails or jRoR, can I also make use of clojure in that environment?

Best Solution

As long as the languages in question actually produce Java classes (that is: classes that are known to the Java platform, not necessarily written in the Java language), then yes: they can easily interact with each other.

At least for Groovy I know that it's entirely possible to write classes that can be used from "normal" Java code.