Use the System.getenv(String)
method, passing the name of the variable to read.
More Related Contents:
- How do I set environment variables from Java?
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- java.lang.ClassNotFoundException in spite of using CLASSPATH environment variable
- how to read System environment variable in Spring applicationContext
- Recommended way to get hostname in Java
- How to refer environment variable in POM.xml?
- Environment variable to control java.io.tmpdir?
- How to test code dependent on environment variables using JUnit?
- What is LD_LIBRARY_PATH and how to use it?
- Is it possible to set an environment variable at runtime from Java?
- Environment Variable with Maven
- SDK Manager.exe doesn’t work
- Eclipse will not open due to environment variables [duplicate]
- Passing JVM arguments to Tomcat when running as a service?
- Can we read the OS environment variables in Java?
- what is the reason for the existence of the JAVA_HOME environment variable?
- How do I set Java’s min and max heap size through environment variables?
- JAVA_HOME and PATH are set but java -version still shows the old one
- Using system environment variables in log4j xml configuration
- Setting up enviromental variables in Windows 10 to use java and javac
- How to give environmental variable path for file appender in configuration file in log4j
- Referencing Environment Variables in web.xml
- Gradle finds wrong JAVA_HOME even though it’s correctly set
- What’s the difference between a System property and environment variable
- “The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe”
- Regarding application.properties file and environment variable
- How to change JAVA.HOME for Eclipse/ANT
- How to set environment variables to an application on OSX Mountain Lion?
- Setting up enviroment variables in Windows 10 to use java and javac
- Tomcat – CATALINA_BASE and CATALINA_HOME variables