*
The moose likes Java in General and the fly likes Capture computer name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Capture computer name" Watch "Capture computer name" New topic
Author

Capture computer name

Hui Ge
Greenhorn

Joined: Mar 11, 2005
Posts: 25
Hi,
Let's say i want to develop a web app that authenticates user via their computer name. Is there anything in the APi that can get the user to send their computer name over to the server to be captured?

Thanks in advance.
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
Use the java.net.InetAddress class. The getLocalHost() method will return an InetAddress reference, on which you call the getHostName() method:
 
GeeCON Prague 2014
 
subject: Capture computer name