I have a Clojure project, and I'm using leiningen. I'm also using tools.namespace to reload Clojure code while running a REPL. If I want to include Java source in the project, can I recompile and reload it while the REPL is running? What is the most convenient/dynamic way of doing it? Can I do it so that it works well with tools.namespace?
You can exit the REPL by typing Ctrl+D (pressing the Ctrl and D keys at the same time).
I'm answering my own bounty here but I did do a bit of work getting this up:
Use Vinyasa,
and here is a blog post:
Dynamic reloading of java code in emacs/nrepl
... actually... it's kinda not working anymore... you have to do back to the earlier versions in order to get the support.
Nowadays (2016->) the better answer is to use Virgil. It watches and recompiles all Java code in your leiningen project automatically in the background, as opposed to Vinyasa's approach of invoking reimport.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With