Java source code examples

Java source code samples. Java code examples.

Gets an environment variable value

* * * * * 1 votes

Gets an environment variable value

public class SystemExample {
	public static void main(String[] args) {
		String value = System.getenv("PATH");

		System.out.println(value);
	}
}

Tags: java.lang

Discuss This Code