System.getProperty("user.name") returns HOSTNAME instead of currently
logged username
Here System.getProperty("user.name"); returns hostname of windows server
2008 machine instead of currently logged in user name. Below is my code
final String user = System.getProperty("user.name");
logger.info("User Name : " + user);
its simple code. Here just i want to know that how System.getProperty
works in java and on windows server 2008? and why it is returning wrong
value in this case? I can provide more details if required.Please help me
here.
No comments:
Post a Comment