This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Host name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Host name" Watch "Host name" New topic

Host name

lynda leanne

Joined: Oct 19, 2003
Posts: 2
Please help, how do you read the name of the host computer? I think you use getLocalHost() but have no idea how. An example would be really great.
thanks in advance,
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
In what context is your app running? Is it an Applet? Is it a Servlet?

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
lynda leanne

Joined: Oct 19, 2003
Posts: 2
Its an applet
I agree. Here's the link:
subject: Host name