Hi,
The only problem with using this method is that it is possible to
change your USERNAME system property to something else (i.e. admin) via
a command propmt (set USERNAME=admin), and then start the application.
If the application is started in the same command dialog, the
application would then get this new name (i.e. admin), when calling
System.getProperty("user.name");
I also would like to get the windows user name from the client, but i
do not like this method due to the above reason. Does anybody else have
another idea?
Thanks,
Jamie
> > Hi All,
> > i want windows login information in my java application.
[quoted text clipped - 4 lines]
>
> private String username = System.getProperty("user.name");
Richard Wheeldon - 28 Aug 2006 19:39 GMT
> I also would like to get the windows user name from the client, but i
> do not like this method due to the above reason. Does anybody else have
> another idea?
The jaas framework will return OS-specific login information if
requested - including Windows usernames and domains and Unix user/group
IDs,
Richard