0

I have spent enough time on google to get the satiesfied answer, but couldn't get any luck.

Finally, I decided to post a question over here.

Generally, using JAVA we are able to read the OS environment variable using the following code:

String value = System.getenv(env);
or 
Map<String, String> env = System.getenv();

Now, i am looking for System.setenv(key, value) kind of thing.

I am using jdk-1.8 & currently working on the Windows but looking for cross platform.

Thank you in advance if any one can help me at this point of time.

UPDATED :-

If this is duplicate then give me the answered URL of this question which needs to be satisfy me. I Believe, The URL is not correctly touch the point what i am asking.

Vishal Gajera
  • 4,137
  • 5
  • 28
  • 55
  • What kind of environment variables are you hoping to set? – Kayaman Jun 29 '17 at 10:51
  • System.getEnv() gives a list of OS env. variable list. the same way i would like to set e.g. System.setEnv() so that other application which are been deployed under the same OS can consume those values. – Vishal Gajera Jul 02 '17 at 05:29

0 Answers0