Lately I've spent too much time dealing with a bug involving having a precise JVM (GraalVM) running my REPL, here is the breakdown of how to know precisely - and change! - the current running JVM with Emacs and Cider.
First, you can inspect the command that will be used by Cider to start the clojure REPL with the universal-argument
command.
Run M-x universal-argument
(SPC u
with Doom Emacs) then cider-jack-in
you could then edit the command before hitting ENTER
to run the edited command.
In my case my project uses the Clojure CLI and deps.edn. You should see that cider use your clojure
executable, on my machine /opt/homebrew/bin/clojure
.
If we inspect the clojure
executable we see that one-liner:
#!/bin/bash
JAVA_HOME="