How can I get the System Variable value which is present in

MyComputer -> Properties -> Advanced -> Environment Variables -> System Variables

in Java?

Edit

I have used System.getenv() method.

It is printing value if I give

System.out.println(System.getenv("JAVA_HOME"));

and it is showing null value if I try the same for system variable created by me

System.out.println(System.getenv("DBE"));

8 Answers
8

Leave a Reply

Your email address will not be published. Required fields are marked *