" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi
In Java we can read the environment variables using System.getEnv().
System.getEnv() was introduced in the very begining of Java. deprecated in JDK 1.2 and reinstated in JDK 1.5.
we can use the following method to read environment variables.
public void readEnvVariables()
Map<String, String> envVariables = System.getenv();
Set stEnvVariables = envVariables.entrySet();
Iterator itrEnvVariables = stEnvVariables.iterator();
Map.Entry mpEnvVar = (Map.Entry) itrEnvVariables.next();
Mail (will not be published) (required)
Enter Captcha Code *
− 2 = two
Burn Ignorance is a knowledge initiative by Mindfire Solutions
Subscribe to our mailing list to get the updates to your email inbox...