FIX: System.getproperty("user.name") Returns NullLast reviewed: January 29, 1998Article ID: Q177175 |
The information in this article applies to:
SYMPTOMSThe Microsoft Virtual Machine for Java build 1518 and earlier returns nullwhile attempting to use System.getProperty("user.name") to determine the users login name.
RESOLUTIONThis is a bug and has been fixed in the Microsoft Virtual Machine for Java that ships with the SDK 2.01 for Java.
STATUSMicrosoft 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 INFORMATIONSteps 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.
REFERENCESFor 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |