This question already has an answer here:<ul><li> <a href="/questions/8306157/how-do-i-start-the-repl-in-a-user-defined-namespace" dir="ltr" rel="nofollow">How do I start the REPL in a user defined namespace?</a> <span class="question-originals-answer-count"> 6 answers </span> </li> </ul>
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
<strong>* Update *</strong> 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)"))
java -cp myapp.jar clojure.main -m myapp.core