harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Beyer <ndbe...@apache.org>
Subject Re: The minimum environment need to set is SystemRoot, using harmony6 and drlvm
Date Tue, 29 Dec 2009 01:01:26 GMT
SystemRoot is pretty common on Windows - it's been standard since
WinXP. I'm surprised that you don't have it set.

-Nathan

On Mon, Dec 28, 2009 at 3:00 AM, Charles Lee <littlee1032@gmail.com> wrote:
> Hi guys,
>
> I am running the selected[1] test cases against the harmony6 + drlvm. My
> local properties is:
>
> os: windows xp professional sp2
> sdk: visual studio 2008
> link: Microsoft (R) Incremental Linker Version 9.00.21022.08
>
> Only one test case fail on my
> site: org.apache.harmony.archive.tests.java.util.jar.JarExecTest
>
> Running test case below[3], RI returns the version of its java but harmony
> return nothing but the error code -1072365564 (0xC0150004). harmony can not
> initialize the java command successfully. If I add the SystemRoot
> environment (uncomment the code which is commented), harmony will pass test
> case[3].
>
> 1. Will anybody test [3] using vs2003? will it pass building with vs2003?
> 2. Why we need SystemRoot on windows?
> 3. I can add the environment SystemRoot in the java code; or add the
> SystemRoot in the Runtime_win.cpp in drlvm; any other good solution to this
> problem?
>
>
>
> [1] ANNOTATION, ARCHIVE,  AUTH, BEANS, CONCURRENT, CRYPTO, JNDI,
> INSTRUMENT, LOGGING, LUNI, MATH, NIO,NIO_CHAR, PACK200, PREFS, REGEX,
> SECURITY, SQL, TEXT, XML[2]
> [2] I am not running lang-management test cases, because it will hang on my
> machine.
> [3] public static void main(String[] args) throws Exception {
>        Runtime rt = Runtime.getRuntime();
>        String javaHome = System.getProperty("java.home");
>        System.out.println(javaHome);
>        String command = javaHome + "/bin/java -version";
> //        String systemRoot = System.getenv("SystemRoot");
> //        System.out.println(systemRoot);
> //        String envSystemRoot = "SystemRoot="+systemRoot;
>        String[] envp = new String[] {"A=B", /*envSystemRoot*/};
>        Process p = rt.exec(command, envp);
>        p.waitFor();
>        System.out.println("Exit value: " + p.exitValue());
>        InputStream in = p.getInputStream();
>        int read = -1;
>        while ((read = in.read()) != -1) {
>            System.out.print((char)read);
>        }
>        System.out.println();
>        in = p.getErrorStream();
>        read = -1;
>        while ((read = in.read()) != -1) {
>            System.out.print((char)read);
>        }
>        System.out.println();
>    }
>
> --
> Yours sincerely,
> Charles Lee
>

Mime
View raw message