Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Capture computer name

 
Hui Ge
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the java.net.InetAddress class. The getLocalHost() method will return an InetAddress reference, on which you call the getHostName() method:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic