Runtime.exec() does not set certain crucial env variables. In particular, it does not set WINDIR and SystemRoot, which win95 and winNT programs (respectivly) use to determine the location of the windows directory.
This bug was discovered in the JavaWebServer, when CGI programs launched from the webserver failed to be able to use network code. It turned out the problem was that the WINDIR env variable needs to be set for winsock to function correctly. Fixing it required inserting win32 specific hacks into the Java code.
This is similar to setting COMSPEC, which Runtime.exec() already does, so the philisophical arguments should be settled.
In this case, the fix is to add a check to see if either variable is already set, if they are not set, then they should be added, set equal to the result of GetWindowsDirectory() (within the native code, of course).