Fork me on GitHub
#cider
<
2021-06-05
>
bbss05:06:47

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.

bbss05:06:10

What is causing cider to start with the wrong jvm?

bbss06:06:47

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

dpsutton06:06:45

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

👍 1
bbss16:06:55

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 🙂