Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2004 13:58:01 +0200
From:      Panagiotis Astithas <past@noc.ntua.gr>
To:        mina mina <usernameking@yahoo.com>
Cc:        freebsd-java@freebsd.org
Subject:   Re: Java Network problem
Message-ID:  <4039EAC9.9090107@noc.ntua.gr>
In-Reply-To: <20040222171440.53970.qmail@web40807.mail.yahoo.com>
References:  <20040222171440.53970.qmail@web40807.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
mina mina wrote:
> hello ,
>   i really dont know if i have to mail this to
> freebsd-java or to sun
> 
> but i have jdk1.4.2 compiled on FreeBSD 5.1
> and now am working on FreeBSD 5.2-RELEASE after
> upgrade
> 
> its network problem i cannot nslookup ip using java
> i have test this code on windows and its work fine
> with the same JDK
> 
> InetAddress addr = InetAddress.getByName (IP); 
> System.out.println ( "IP Address : " +
> addr.getHostAddress ()) ; 
> System.out.println ( "hostname   : " +
> addr.getHostName () ); 
> 
> getting address (IP) of hostname is work fine 
> 
> but if i wana get the hostname for IP its gives me the
> same IP
> 
> and my connection is Dailup
> 
> thanks alot
> Mina

Works fine for me. The only case I get the IP address instead of the 
host name is when there is no A entry in the DNS server's zone file. 
When you use nslookup/host/dig to make the same requests do you get a 
name? Do you have a correct /etc/resolv.conf? What versions of FreeBSD & 
JDK do you use?

Cheers,
-- 
Panagiotis Astithas
Electrical & Computer Engineer, PhD
Network Management Center
National Technical University of Athens, Greece



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4039EAC9.9090107>