Re: Does Leiningen read Env Vars such as JAVA_OPTS?

274 views
Skip to first unread message

Sean Corfield

unread,
Feb 9, 2016, 1:16:22 PM2/9/16
to Clojure Mailing List
Michael Drago wrote on Tuesday, February 9, 2016 at 6:37 AM:
Hi guys. I'm trying to figure out where the JVM gets the java parameters (such as -Xms and -Xmx) when starting apps via "lein run" and when using the repl. The only successful way I have been able to set the memory is via the project.clj's :jvm-opts. Can we do this with an environment variable such as $JAVA_OPTS? I've tried $JAVA_OPTS with no success. When the env var is set the JVM's memory resorts to the system default. I am trying to do this on Redhat (Leiningen 2.4.2 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM). Thank you!

Looks like JVM_OPTS is what you want, based on a quick look at the source code… 


And the docs seem to confirm that:


Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

Reply all
Reply to author
Forward
0 new messages