harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Beliaev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2741) [drlvm][classlib] unexpected result for 'user.home' on windows in empty environment
Date Tue, 22 May 2007 15:31:16 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497898
] 

Vladimir Beliaev commented on HARMONY-2741:
-------------------------------------------

The bug is not reproducible for me:

~/test-H2741 $ java Test java -showversion tst
Command to run:
        java -showversion tst 
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
BEA JRockit(R) (build R27.1.0-109-73164-1.5.0_08-20061129-1428-windows-ia32, compiled mode)

vbeliaev
C:\Documents and Settings\vbeliaev
c:\users\vbeliaev\test-H2741

exit code is 0




~/test-H2741 $ ../trunk-debug-20070518/working_vm/build/deploy/jdk/jre/bin/java Test \
        ../trunk-debug-20070518/working_vm/build/deploy/jdk/jre/bin/java -showversion tst
Command to run:
        ../trunk-debug-20070518/working_vm/build/deploy/jdk/jre/bin/java -showversion tst

Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.

java version "1.5.0" 
pre-alpha : not complete or compatible
svn = r539322, (May 18 2007), Windows/ia32/msvc 1310, debug build
http://incubator.apache.org/harmony

vbeliaev
C:\Documents and Settings\vbeliaev
c:\users\vbeliaev\test-H2741

exit code is 0

=========
Vladimir, could you verify it & update enviromnment description for reproduction or Resolve
this issue?

Thanks
Vladimir Beliaev


> [drlvm][classlib] unexpected result for 'user.home' on windows in empty environment
> -----------------------------------------------------------------------------------
>
>                 Key: HARMONY-2741
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2741
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Vladimir Ivanov
>            Priority: Minor
>
> The DRLVM reports the incorrect 'user.home' variable (%SystemDrive% instead of drive)
if vm was run in empty environment. Note RI works OK.
> ================ test.java ====================
> import java.io.*;
> public class test {
>     
>     public static volatile String cmdS = "java -version";
>     void read(InputStream stream) {
>         try {
>             byte[] data = new byte[stream.available()];
>             stream.read(data, 0, data.length);
>             if (data.length > 0) {
>                 System.out.println(new String(data, 0, data.length));
>             }
>         } catch (IOException e) {
>             e.printStackTrace();
>         }
>     }
>     public void run(String[] args) {
>         if (args != null && args.length > 0) {
>             cmdS = "";
>             for (int i = 0; i < args.length; i++) {
>                 cmdS = cmdS + args[i] + " ";
>             }
>         }
>         System.out.println("Command to run:\n\t" + cmdS);
> 	String[] envp = {};
>         try {
>             Process proc = Runtime.getRuntime().exec(cmdS, envp);
>             InputStream err = proc.getErrorStream();
>             InputStream in = proc.getInputStream();
>             int ec = Integer.MIN_VALUE;
>             while (true) {
>                 try {
>                     ec = proc.exitValue();
>                     break;
>                 } catch (IllegalThreadStateException  e) {
>                     try {
>                         Thread.sleep(100);
>                         read(in);
>                         read(err);
>                     } catch (InterruptedException e1) {
>                         e1.printStackTrace();
>                     }
>                 }
>             }
>             System.out.println("exit code is " + ec);
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
>     }
>     public static void main(String[] args) {
>         new test().run(args);
>     }
> }
> class tst {
>     public static void main(String[] args) {
> 	System.out.println(System.getProperty("user.name"));
> 	System.out.println(System.getProperty("user.home"));
> 	System.out.println(System.getProperty("user.dir"));
>     }
> }
> ===========================================
> Output:
> C:\tmp\tmp17>C:\jdk1.5.0_08\bin\java.exe test C:\jdk1.5.0_08\bin\java.exe -cp . -showversion
tst
> Command to run:
>         C:\jdk1.5.0_08\bin\java.exe -cp . -showversion tst
> vivanov1
> C:\Documents and Settings\vivanov1
> C:\tmp\tmp17
> java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode)
> exit code is 0
> C:\tmp\tmp17>C:\jdk1.5.0_08\bin\java.exe test C:\harmony.top\drlvm\trunk\build\win_ia32_msvc_debug\deploy\jdk\jre\bin\java
-cp . -showversion tst
> Command to run:
>         C:\harmony.top\drlvm\trunk\build\win_ia32_msvc_debug\deploy\jdk\jre\bin\java
-cp . -showversion tst
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r487441, (Dec 15 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> vivanov1
> %SystemDrive%\Documents and Settings\vivanov1
> C:\tmp\tmp17
> exit code is 0
> C:\tmp\tmp17>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message