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.

2
  • What kind of environment variables are you hoping to set? Commented Jun 29, 2017 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. Commented Jul 2, 2017 at 5:29

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.