From dev-return-38747-apmail-harmony-dev-archive=harmony.apache.org@harmony.apache.org Tue Dec 29 01:01:56 2009 Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 93558 invoked from network); 29 Dec 2009 01:01:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Dec 2009 01:01:56 -0000 Received: (qmail 46130 invoked by uid 500); 29 Dec 2009 01:01:55 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 46031 invoked by uid 500); 29 Dec 2009 01:01:54 -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 46019 invoked by uid 99); 29 Dec 2009 01:01:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Dec 2009 01:01:54 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nbeyer@gmail.com designates 74.125.78.147 as permitted sender) Received: from [74.125.78.147] (HELO ey-out-1920.google.com) (74.125.78.147) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Dec 2009 01:01:47 +0000 Received: by ey-out-1920.google.com with SMTP id 3so2403694eyh.50 for ; Mon, 28 Dec 2009 17:01:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=KgfqMqG6nSuG2m5a2+bYzUBAKX1vqseJ2letK22QWqc=; b=mZke+gtbTmRc224epKasnRomCLXiWJCpLkKgWygY96w8PaSn/o1nzhDj3MfNjBvjlC BINgEEYKU5aXKvX9HbjmPBGX1njOLh7+dIDOlNQcLWodxdf+gMdv8TARroSmBpMmcBIw +mAJhjAg0IYsMhSDizEeBQr9I6kPZ+sxqLmfA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=sQD9VB6ABm2Bu9vcQEGGGuxt/wJQA4kqFaEp16KqJXsDvtroRe2MK59t7od7/zHMVO GO5t1cBy5j11yuzgDo5LwXJZO+5DkfJaTZnooK8p76thUeIePwjqOkeh0G2yZS+0l989 dha3nuhAtX3/cA/ase5OYZfkM2KpccGEhjnv4= MIME-Version: 1.0 Sender: nbeyer@gmail.com Received: by 10.216.87.9 with SMTP id x9mr3754325wee.0.1262048486213; Mon, 28 Dec 2009 17:01:26 -0800 (PST) In-Reply-To: <5948b71e0912280100t246ff4ccn582a5cb7591ee8d@mail.gmail.com> References: <5948b71e0912280100t246ff4ccn582a5cb7591ee8d@mail.gmail.com> Date: Mon, 28 Dec 2009 19:01:26 -0600 X-Google-Sender-Auth: cf64e11c9a60f472 Message-ID: <3b3f27c60912281701i126e3299o67d621f13039fb4d@mail.gmail.com> Subject: Re: The minimum environment need to set is SystemRoot, using harmony6 and drlvm From: Nathan Beyer To: dev@harmony.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 harmon= y > return nothing but the error code -1072365564 (0xC0150004). harmony can n= ot > initialize the java command successfully. If I add the SystemRoot > environment (uncomment the code which is commented), harmony will pass te= st > 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 th= is > problem? > > > > [1] ANNOTATION, ARCHIVE, =C2=A0AUTH, 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 { > =C2=A0 =C2=A0 =C2=A0 =C2=A0Runtime rt =3D Runtime.getRuntime(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0String javaHome =3D System.getProperty("java.h= ome"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0System.out.println(javaHome); > =C2=A0 =C2=A0 =C2=A0 =C2=A0String command =3D javaHome + "/bin/java -vers= ion"; > // =C2=A0 =C2=A0 =C2=A0 =C2=A0String systemRoot =3D System.getenv("System= Root"); > // =C2=A0 =C2=A0 =C2=A0 =C2=A0System.out.println(systemRoot); > // =C2=A0 =C2=A0 =C2=A0 =C2=A0String envSystemRoot =3D "SystemRoot=3D"+sy= stemRoot; > =C2=A0 =C2=A0 =C2=A0 =C2=A0String[] envp =3D new String[] {"A=3DB", /*env= SystemRoot*/}; > =C2=A0 =C2=A0 =C2=A0 =C2=A0Process p =3D rt.exec(command, envp); > =C2=A0 =C2=A0 =C2=A0 =C2=A0p.waitFor(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0System.out.println("Exit value: " + p.exitValu= e()); > =C2=A0 =C2=A0 =C2=A0 =C2=A0InputStream in =3D p.getInputStream(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0int read =3D -1; > =C2=A0 =C2=A0 =C2=A0 =C2=A0while ((read =3D in.read()) !=3D -1) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0System.out.print((char)read); > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0 =C2=A0 =C2=A0System.out.println(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0in =3D p.getErrorStream(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0read =3D -1; > =C2=A0 =C2=A0 =C2=A0 =C2=A0while ((read =3D in.read()) !=3D -1) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0System.out.print((char)read); > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0 =C2=A0 =C2=A0System.out.println(); > =C2=A0 =C2=A0} > > -- > Yours sincerely, > Charles Lee >