• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

windows user name

 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I need to know which user has logged in machine(windows os),that means username id and password for windows Nt. how can be this down in java ..is any way....
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Getting the actual password requires finding (another)
security hole in Windows.
Getting the user name is the user.name property.
Look up the Javadocs for System.getProperty().
If you're looking for single sign on kinds of capabilities,
there are several good books on Java security. It will
require additional non-Java code on the Windows side.
Thanks,
Joe
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am just looking on getting tha username only.
In system.property(JDK1.3) i was not able to found anything related with this.
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by james edwin:
hi,
I am just looking on getting tha username only.
In system.property(JDK1.3) i was not able to found anything related with this.

You can get the user name by -

Moreover, the following code should list all the system properties for you.

Let me know if it helps.
HTH,
- Manish
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks manish..........It helped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic