Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4079572

user.home can't be set on Win32 with -D option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 1.1.5
    • 1.1.4
    • hotspot
    • None
    • 1.1.5
    • sparc
    • solaris_2.5.1
    • Verified

      This problem is only on the wintel platform. I ran the following program using
      JDK1.1.4. I also tried JDK1.1.3 and it still did not work. It only works
      correctly using JDK1.1.1. When "user.home" is passed at the command line
      on Wintel, the output is wrong.

      On Solaris:
      $ java prop user.home
      /home/kammy <-- correct output
      $ java -Duser.home=/set/sqe/java prop user.home
      /set/sqe/java <-- correct output

      On wintel
      c:/ java prop user.home
      c: <-- correct output
      c:/ java -Duser.home=e:/test prop user.home
      c: <--- WRONG!!!

      Here is the program to reproduce the error:

      class prop {
        public static void main (String args[]) {
          System.out.println(System.getProperty(args[0]));
        }
      }

            apalanissunw Anand Palaniswamy (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: