I'm working on Java.
is there any option in the "java"
to set the user defined environmental variable to the executable that we will execute using "java"
command.
e.g. we have one option -XX:+AllowUserSignalHandlers.
I'm working on Java.
is there any option in the "java"
to set the user defined environmental variable to the executable that we will execute using "java"
command.
e.g. we have one option -XX:+AllowUserSignalHandlers.
You can set tuning parameter to JVM at the start of the program itself.
ex -
java -XMS50m -XX:+AllowUserSignalHandlers Test.class
Once jvm is started you can not set environment variables but you can view them System.genEnv
it retuns an unmodifiable string map view of the current system environment.
If you are creating a new process then you can set environment variables using ProcessBuilder.environment
.
There is no environment variable that java.exe parses and used to set command line arguments.
You have to write a program/script that would process your custom environment variable and then pass to actual java program.