The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
March 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Hostname in Networing

Posted by naresh kakrani on March 24, 2001 at 5:55 AM


I have created a small program through which we can get host name by giving IP Address.

The class i have used is InetAddress and methods are getHostName and getHostAddress.

Here i am giving any dummy IP address it is accepting that IP and giving host name as IP and also IP address as it.

I have 10 computers on net, when I run above java program and try to find out Hostname by IP address then it is giving host name of some PC, But it is not giving Host name of some IP address.

I want to know why it is happening.

Yr ans is highly appreciated...

Naresh




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us