FIX: System.getproperty("user.name") Returns Null

Last reviewed: January 29, 1998
Article ID: Q177175
The information in this article applies to:
  • Microsoft Win32 Virtual Machine for Java

SYMPTOMS

 The Microsoft Virtual Machine for Java build 1518 and earlier returns null
while attempting to use System.getProperty("user.name") to determine the users login name.

RESOLUTION

This is a bug and has been fixed in the Microsoft Virtual Machine for Java that ships with the SDK 2.01 for Java.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in the Microsoft VM for Java that is provided in the SDK 2.01 for Java.

MORE INFORMATION

Steps to reproduce the problem:

Create a Java Project and include the following class to it:

   class TestProperty
   {
      public static void main(String args[])
      {
        System.out.println(System.getProperty("user.name"));
      }
   }

With the Microsoft Virtual Machine for Java, this will return null. However with Microsoft Virtual Machine for Java included with the SDK 2.01 for Java, it will correctly return the user's login name.

REFERENCES

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/visualj/
   http://support.microsoft.com/support/java/


Additional query words: getProperty user name system properties

Keywords : kbcode kberrmsg JVM
Technology : kbInetDev internet
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 29, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.