I defined a new environment variable in ~/.zshrc
like that: export JVM_XMX=-Xmx2048M
. I can verify that it was set correctly running export
command and finding it in the list.
Now I want to use it in SBT. I've tried these two approaches:
sys.env("JVM_XMX")
sys.env.get("JVM_XMX")
But the value couldn't be found or the Option
is None
. Errors that I see are:
NoSuchElementException: key not found: JVM_XMX
NoSuchElementException: None.get
What I also tried was to add the variable into SBT in IntelliJ Settings. I went to Build, Execution, Deployment
-> Build Tools
-> sbt
and set VM parameters
to -DJVM_XMX=-Xmx2048M
. It didn't help.
Anyone knows how to setup SBT to work with IntelliJ correctly?
Versions used:
sbt 1.2.8
IntelliJ IDEA 2019.2.1