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

Vista: user.home property not set correctly

    XMLWordPrintable

Details

    • b75
    • x86
    • windows_vista
    • Not verified

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.6.0"
        Java(TM) SE Runtime Environment (build 1.6.0-b105)
        Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.0.6000]

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        Corporate computer part of a Windws NT domain.

        A DESCRIPTION OF THE PROBLEM :
        The system property user.home is wrong. If my login name is xxxx, the user.home directory should be c:\Users\xxxx on Vista. Java gets the user.name right, but the user.home is different: in my case it uses the domain guest account, which I have no clue how it gets to that! It might just be that it is the first directory found in C:\Users.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        1.6.0
        xxxx
        C:\Users\xxxx

        ACTUAL -
        1.6.0
        xxxx
        C:\Users\DGUEST

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        public class TestUserHome {
          public static void main(String[] args) {
            System.out.println(System.getProperty("java.version"));
            System.out.println(System.getProperty("user.name"));
            System.out.println(System.getProperty("user.home"));
          }
        }

        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Force the user.home system property to the correct as a -Duser.home=... argument to the JVM.

        Attachments

          Issue Links

            Activity

              People

                uta Alexey Utkin (Inactive)
                ndcosta Nelson Dcosta (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: