there is a System.getProperties(), but it only gives you the environment variables in Java environment
I believe the os environment variables are not used in Java, as they are not platform-portable
of course, if you know some program can list all environment variables, you can use code like the following to retrieve them
String[] cmd = { "someprogram"};
Process p = Runtime.getRuntime().exec(cmd);
InputStreamReader isr = new InputStreamReader(p.getInputStream());
BufferedReader br = new BufferedReader(isr);