Is it possible to get the parameter sent to the java launcher, set it as a environment property (for the lifetime of the java process) before launching the application ?
For E.g: If the input parameter to the Java launcher (.exe) is a file path. I want to set the environment variable as INPUT_FILE_PATH=%1. Then in the java code I would use it as System.getEnv("INPUT_FILE_PATH").
With a batch file this is possible but how to configure it with a Java launcher ?
asked 17 May '12, 16:08
Unfortunately it is not possible to run any actions (such as setting environment variables) prior to launching the Java process.
What you can do is pass the parameters by setting
answered 18 May '12, 11:03