From dev-return-38748-apmail-harmony-dev-archive=harmony.apache.org@harmony.apache.org Tue Dec 29 02:30:06 2009 Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 24093 invoked from network); 29 Dec 2009 02:30:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Dec 2009 02:30:06 -0000 Received: (qmail 88830 invoked by uid 500); 29 Dec 2009 02:30:05 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 88739 invoked by uid 500); 29 Dec 2009 02:30:05 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 88728 invoked by uid 99); 29 Dec 2009 02:30:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Dec 2009 02:30:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of littlee1032@gmail.com designates 209.85.223.183 as permitted sender) Received: from [209.85.223.183] (HELO mail-iw0-f183.google.com) (209.85.223.183) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Dec 2009 02:29:57 +0000 Received: by iwn13 with SMTP id 13so7356203iwn.20 for ; Mon, 28 Dec 2009 18:29:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=LQNzkKGO3B6RnauI/PX1a6/l7rAO8/tS+jEKT4qoPvY=; b=eBnBkV0UjaIzzS+UHjxu7OI1S4+Lc7RsPld2xxMFHyskuaofL8ybLSYVlw005H536E pyk5p5LMt9IQI6a5beHQV2pOSVgrbtv7CHEBlzHGrCuCIIDVBDlVXww9nBbXzLI/VvAI n1dKjFV3/Qvv+EOGz41N4P6Iiw0ZwINNJ4nCI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ckCkT5l75Tu4omZ9MqeR2L96TwT9g377suL8E3ruvTkkrZCC99DbVjGZnybWOpd8An i9aVSUW+a8Bx+BgQbMc7KKVyBAp/vVEqk1QcZIzbaPG7Lho+eV6XgfZ5+kfzvslkOe8X QaPnsgRvroIf0zSdvxrs/vh7NNL0dGTJP1mc4= MIME-Version: 1.0 Received: by 10.231.122.139 with SMTP id l11mr3379092ibr.53.1262053776167; Mon, 28 Dec 2009 18:29:36 -0800 (PST) In-Reply-To: <3b3f27c60912281701i126e3299o67d621f13039fb4d@mail.gmail.com> References: <5948b71e0912280100t246ff4ccn582a5cb7591ee8d@mail.gmail.com> <3b3f27c60912281701i126e3299o67d621f13039fb4d@mail.gmail.com> Date: Tue, 29 Dec 2009 10:29:36 +0800 Message-ID: <5948b71e0912281829y601c4f76we5c7edfbd2d283af@mail.gmail.com> Subject: Re: The minimum environment need to set is SystemRoot, using harmony6 and drlvm From: Charles Lee To: dev@harmony.apache.org Content-Type: multipart/alternative; boundary=001485f99caa041410047bd4cb9d X-Virus-Checked: Checked by ClamAV on apache.org --001485f99caa041410047bd4cb9d Content-Type: text/plain; charset=ISO-8859-1 Hi Nathan, With the code: String[] envp = new String[] {"A=B", /*envSystemRoot*/}; Process p = rt.exec(command, envp); If we provide a envp to the Runtime, we are supposed to provide all the environment to the sub process. (We are using CreateProcess on Windows, which you can find in Runtime_win.cpp in vmcore). It is not I do not have the SystemRoot env. It is just the program suppose to be. I have found that JarExecTest is passed on your site according to your test report. Would you please try the test case I have posted above? will it also pass on your site? For more information: I am using java6 branch with revision: r893709 and the drlvm with revision: r889144 On Tue, Dec 29, 2009 at 9:01 AM, Nathan Beyer wrote: > 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 > 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 > > > -- Yours sincerely, Charles Lee --001485f99caa041410047bd4cb9d--