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

Heiko Wagner heiko.wagner at apis.de
Mon Mar 23 10:56:48 UTC 2009


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.

-----Original Message----- From: Martin Buchholz [mailto:martinrb at google.com] Sent: Montag, 23. März 2009 04:24 To: Heiko Wagner Cc: core-libs-dev at openjdk.java.net; Xueming Shen; Alan Bateman Subject: Re: RFE 4519026: (process) Process should support Unicode on Win NT, request for review

Heiko, Thanks for your continuing work on this.

ProcessBuilder/Basic.java has most of the tests related to subprocesses. I can't explain a return code of 6, since the test uses 5, 7, and 8.

ProcessBuilder has a lot of infrastructure to help you write a test in this area, but it can be intimidating to newcomers (i.e. anyone but myself).

The JDK C code is quite inconsistent, but please use the style

/*

for block comments, and /* inline comments */ like this.

You need to remove the comment /* selected based on exe type */ which is no longer correct.

If you fix the style things, and get the tests to pass, and add a test for what you're actually trying to fix, I am ready to approve the change.

Martin



More information about the core-libs-dev mailing list