Eclipse environment variables
I use Eclipse.开发者_如何学Go I set for my project some environment variables. Can I get it from my java code with System.getProperty("SOME_VAR")
?
How can I get the environment variables from java code in Eclipse?
System.getProperty(String propertyName) - this method is used for getting properties and not for the environment variables.
To get environment variable you can use System.getenv(String envName) method.
First link in google leads to this http://blog.codebeach.com/2008/02/get-environment-variables-in-java.html
精彩评论