RFE 4519026: (process) Process should support Unicode on Win NT, request for review

Alan Bateman Alan.Bateman at Sun.COM
Mon Mar 23 12:56:06 UTC 2009

Heiko Wagner wrote:
> Thanks for the description of the comment writing style. I have
> investigated, why I get a return code of 6. This return code indicates that
> java.exe launcher fails to start the Java VM. I will try to explain step by
> step. ;-)
> This is the test code that fails:
> 	try {
>             ProcessBuilder pb = new ProcessBuilder();
>             pb.environment().clear();
>             equal(getenvInChild(pb), "");
>         } catch (Throwable t) { unexpected(t); }
> 1) this code does start the java.exe
> 2) java.exe tries to start the Java VM in function LoadJavaVM
> 3) LoadJavaVM tries to load the jvm.dll via LoadLibrary
> 4) LoadLibrary loads the jvm.dll and it's dependent libraries, in particular
> the C runtime lib
> 5) loading of the MSCV90.DLL fails with error message:
>    "Unable to resolve storage root for assembly directory
> x86_Microsoft.VC90.CRT"
>    This is caused by the "pb.environment().clear()", because it clears the
> env variable %SystemRoot%.
> 6) LoadLibrary fails due to missing dependencies, thus causing java.exe fail
> with exit code 6
> You might not experience this problem, when you compile the JDK with an oder
> MS VC++ version. According to the build readme in the JDK VS2008 is required
> ("...The 32-bit OpenJDK Windows build requires Microsoft Visual Studio C++
> 2008 (VS2008) Standard Edition compiler..."), but it seems the binary build
> downloads on the openJDK site use an older version of Visual Studio.
This does seems to be an environment issue. I ran this test with b51 on 
Windows XP and it fails for each case where the child is created without 
SystemRoot in the environment. This build  was done with VC7/.NET 2003. 
I hacked the test to ensure that this variable is inherited from the 
parent and the modified tests works as expected. I also grabbed your 
changes and patched my src/windows/native/java/lang/ProcessImpl.c and 
all Runtime and ProcessBuilder tests are passing.


More information about the core-libs-dev mailing list