It gets the USER account name... (1) how and from where does java interpreter get this??? (2) Will it be equal to the (say) Windows Log-in name, OR it is got from the System and will not be read from Windows Log on;
just wanted to figure out, because if it is the windows log in name, then at some applications, i can prevent the user from logging and by default use the windows-login name, to identify the user..
Otherwise, Is there a way to read Windows log on name, from java??
it will be great if u guys help me on this.. appreciate your help.. thx ;-)
Yes, it is retrieved from the underlying O/S. As long as you control the program you should be ok. However, there is nothing from stoping something like:
C:\scott> java Props user.name is "scottd"
C:\scott>java -Duser.name=blah Props user.name is "blah"
So be careful with who can change the startup script.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
Joined: Jun 15, 2002
so you mean to say it is read from the O/S (maybe say from some Registry key).. but it will not be the same as the O/S log in? (which sometimes will be different, say a public system, where different users log in.. )