Java Clojure Interoperability, Calling Clojure from Java
So far, Java interoperability with Clojure is pretty seamless. Calling Java from Clojure is pretty much built into the language. Calling Clojure from Java is easy as well. I didn't do any research before coming up with this example, I essentially looked at the Clojure Java source code and went from that. Here is an example, invoking Clojure and then passing a Spring Framework Context object to the Clojure code, also calling Clojure methods. There is the advantage in doing this, you can write concise Clojure code and then invoke that module from Java. package test.toolkit. clojure ; import org . springframework . context . support . ClassPathXmlApplicationContext ; import clojure . lang . Namespace ; import clojure . lang . RT ; import clojure . lang . Symbol ; import clojure . lang . Var ; public class TestSpringLoadClojure { /////////////////////////////////////////////////////////////////////////// public static void loadScripts () throws Exc...