Fork me on GitHub

I needed to use different versions of Java on macOS so I used jenv and brew to install and switch between them, however I now noticed cider keeps trying to use jvm 11. I tried changing the $JAVA_HOME env variable but it doesn't seem to effect it. If I start a terminal in emacs and run the clojure command that I execute with C-u C-c C-x j j - jack-in command then it does run the right jvm.


What is causing cider to start with the wrong jvm?


I fixed it by uninstalling jenv, still strange that jack-in has the issue, but shell usage from emacs did not.


I believe that it will use emacs environment when jacking in since it’s a sub process. Probably best to cider connect to ensure everything is working correctly

👍 3

yes, so even if I started clojure from the same terminal window I start emacs from it would use the right jdk. Oh well, everything working as usual now without jenv 🙂