问题
Specifically with a leiningen uberjar.
java -cp myapp.jar clojure.main -r
gets me a repl but defaults to the user namespace What do I need to do to get it to myapp's namespace?
java -cp myapp.jar clojure.main -e (in-ns myapp.core)
gives me clojure.lang.LispReader$ReaderException
* Update * The ultimate goal is to simply run
java -jar myapp.jar
and have a Clojure REPL in my app's namespace. Every solution I've seen involves writing code on the command line that I want to put into my main method but can't seem to get running
(defn -main [&args]
(clojure.main/main "-e" "(in-ns myapp.core)"))
completes/terminates immediately
回答1:
java -cp myapp.jar clojure.main -m myapp.core
来源:https://stackoverflow.com/questions/29311286/how-do-i-open-a-repl-in-a-different-namespace