In my project configuration in IDEA, I have the following text fields:

I would like to define some environment variables and refer to them in the "VM options"and fields "Program arguments".
I tried using the following definitions for environment variables:
MY_FOLDER=/some/random/path
MY_ARGUMENT=2
and then in "VM options"I entered:
- Dfoo=$MY_FOLDER
and in the arguments of the program I introduced
$MY_ARGUMENT foo bar
However, environment variables do not seem to be allowed until my class is called, i.e. if I check args[0]in Java, it contains a string value $MY_ARGUMENT, not 2 .
Why? and how can i fix it?
source
share