PRB: System.getProperty("user.home") Returns IncorrectlyID: Q177181
|
When calling System.getProperty("user.home") the Java Virtual Machine (VM) ignores the HOME environment variable value. It always returns "<windir>\java" whether or not you set the HOME environment variable.
class TestProperty
{
public static void main(String args[])
{
System.out.println(System.getProperty("user.home"));
}
}
This always returns <windir>\java (where <windir> is the location of your
Windows 95, Windows 98, or Windows NT installation), no matter which
directory you set the HOME environment variable to.
For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java,
please see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
Additional query words: System properties home
Keywords : kbSDKJava300 kbSDKJava310 JVM kbSDKJava320
Version : WINDOWS:2.02,3.0,3.1,3.2
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 13, 1999