This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-03
Channels
- # announcements (35)
- # aws (20)
- # babashka (4)
- # beginners (88)
- # cider (9)
- # clara (1)
- # clj-kondo (6)
- # cljsrn (3)
- # clojure (107)
- # clojure-dev (7)
- # clojure-europe (99)
- # clojure-nl (3)
- # clojure-spec (9)
- # clojure-uk (2)
- # clojurescript (28)
- # core-async (53)
- # cursive (11)
- # datascript (1)
- # datomic (2)
- # emacs (20)
- # fulcro (3)
- # graalvm (4)
- # holy-lambda (18)
- # jobs (1)
- # kaocha (7)
- # leiningen (2)
- # lsp (25)
- # luminus (1)
- # membrane-term (52)
- # missionary (8)
- # nextjournal (19)
- # off-topic (16)
- # other-languages (3)
- # podcasts-discuss (2)
- # polylith (23)
- # re-frame (4)
- # reclojure (6)
- # remote-jobs (1)
- # rewrite-clj (36)
- # ring (1)
- # sci (10)
- # shadow-cljs (7)
- # spacemacs (5)
- # sql (20)
- # uncomplicate (1)
- # vscode (3)
- # xtdb (27)
I have a somewhat random and very environment specific question but hoping I’m just missing something obvious.. I’m wondering how to make emacs automatically/always aware of $JAVA_HOME
.. I use jabba
to manage JVMs, and $JAVA_HOME
is set by default in any new terminal I run, but emacs (spacemacs) is unable to locate a Java runtime by default, until I set it manually
The Jabba readme says it changes the RC file of the shell. So I assume it sets JAVA_HOME to a specific install of Java.
Running Emacs command from the terminal should pick up the JAVA_HOME environment variable.
However, if running Emacs from a desktop launcher (dock/menu), then I assume the .profile
file for your OS account must source the RC file, e.g ~/.bashrc
If JAVA_HOME is changed when Emacs is running, then try reloading environment variables using SPC f e E
Note that any running Clojure REPL will need to be restarted (stop/start) to pick up changed environment variables
I’ve always used jenv. You can set a local jvm version per directory with a .java-verison
file. Emacs (as well as other editors) seems to respect it.
this is helpful, thank you!