Environment variables are an Operating System dependant concept. Because Java is OS independant it has no way of accessing environment variables. About as close as you are going to get is setting System Properties on the command line when invoking the JVM.
Obtaining the PID is also an Operating System concept that is not supported directly by Java. I have however seen it done using native JINI calls to a .dll. Now that I think of it, I bet the same can be done to get to the environment variables.
System.getenv() is not deprecated for Java 5 (or rather it has been undeprecated):
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getenv()
Let's move this discussion to http://forum.java.sun.com/thread.jsp?forum=31&thread=556864&tstart=0&trange=15
These double posts are an evil thingie ...