We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
"I wish there was more "best practice" out there about having a shim for -main and dynamically loading the rest"
-main
launching a clojure program, refs clojure#140
Not sure how idiomatic it is (or if I've misunderstood the question), but here's what we use:
package our.cool_app; import clojure.java.api.Clojure; import clojure.lang.IFn; public class Main { public static void main(String[] args) { try { IFn require = Clojure.var("clojure.core", "require"); require.invoke(Clojure.read("our.cool_app.core")); Clojure.var("our.cool_app.core", "start!").invoke(); } catch (Throwable e) { System.out.println(e.getMessage()); } } }
Activity
launching a clojure program, refs clojure#140
danielcompton commentedon Sep 19, 2016
Not sure how idiomatic it is (or if I've misunderstood the question), but here's what we use: