How can I run Clojure REPL from my java application and provide some "predefined variables" (I am new to Clojure, I guess it works better for this)? In fact, I already tried to do this by coincidence ... I started with clojure.main and added an extra call to RT.var (). Is this the right way to do this?
import clojure.lang.Symbol; import clojure.lang.Var; import clojure.lang.RT; public class MyClojure { final static private Symbol CLOJURE_MAIN = Symbol.intern("clojure.main"); final static private Var REQUIRE = RT.var("clojure.core", "require"); final static private Var MAIN = RT.var("clojure.main", "main");
EDIT: my application is not a web application. This is a standalone desktop application that basically displays / edits the pojo data model. Now I want to add support to map the data model from a running application to Clojure repl. Then I can change / check the data model, both the source application and repl.
zedoo
source share