53

How do I set JVM options like -server when I launch Clojure using Leiningen?

David
  • 81
  • 1
  • 6
2daaa
  • 2,788
  • 7
  • 33
  • 44

1 Answers1

75

Looking at the sample.project.clj file on the github repository, It looks like you can pass JVM arguments using the :jvm-opts keyword. For Example:

:jvm-opts ["-Xmx1g" "-server"] 
Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
Joel Boehland
  • 866
  • 8
  • 4
  • 14
    I just tried it, and it looks like each option should be a separate entry in the vector so: :jvm-opts ["-Xmx1g" "-server"] – 2daaa Sep 21 '10 at 14:14
  • 1
    any idea why `:jvm-opts ["--illegal-access=permit"]` doesn't silence the respective warnings (on v11)? – Erik Kaplun Jul 24 '19 at 13:49