I don't get any errors in the archive module. Environment: Windows XP SP3 VisualStudio 2003 SP1 java6 branch
On Mon, Dec 28, 2009 at 8:29 PM, Charles Lee <littlee1...@gmail.com> wrote: > 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 <ndbe...@apache.org> 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 <littlee1...@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 >> > >> > > > > -- > Yours sincerely, > Charles Lee >