the system property 'user.name' should return the current user name.
the string returned does not include the domain name.
If the jvm is launched under the 'FOO\bar' account , System.getProperty("user.name")
will only return 'bar'
On windows, a user name is [domain\]<user name>
It is then impossible to make the difference between a local and a doamin user account
And so to get the current user account/name
This call should return a full qualified (and so usable) name accross all platforms
On windows a full qualified user name must contains the domain name (if domain account)
the string returned does not include the domain name.
If the jvm is launched under the 'FOO\bar' account , System.getProperty("user.name")
will only return 'bar'
On windows, a user name is [domain\]<user name>
It is then impossible to make the difference between a local and a doamin user account
And so to get the current user account/name
This call should return a full qualified (and so usable) name accross all platforms
On windows a full qualified user name must contains the domain name (if domain account)
- relates to
-
JDK-4448660 Windows: System.getProperty("user.name") method returns value of USERNAME enviro
-
- Closed
-