Accessing the environment from Java applications

One of the more irritating aspects of Java (prior to 1.5) is the lack of any way to access environment variables. What makes this omission all the more galling is that a method exists to do just that, java.lang.System.getenv, but Sun have disabled it in all recent versions of Java.

Ron Yorston
28th February 2005