From owner-freebsd-java@FreeBSD.ORG Mon Feb 23 03:58:40 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCEA616A4CE for ; Mon, 23 Feb 2004 03:58:40 -0800 (PST) Received: from ulysses.noc.ntua.gr (ulysses.noc.ntua.gr [147.102.222.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 174F743D1D for ; Mon, 23 Feb 2004 03:58:40 -0800 (PST) (envelope-from past@noc.ntua.gr) Received: from ajax.noc.ntua.gr (ajax.noc.ntua.gr [147.102.220.1]) by ulysses.noc.ntua.gr (8.12.9p1/8.12.9) with ESMTP id i1NBwcFO023488; Mon, 23 Feb 2004 13:58:38 +0200 (EET) (envelope-from past@noc.ntua.gr) Received: from noc.ntua.gr (ppp-229-010.dialup.ntua.gr [147.102.229.10]) by ajax.noc.ntua.gr (8.12.9p1/8.12.9) with ESMTP id i1NBwaKY059561; Mon, 23 Feb 2004 13:58:37 +0200 (EET) (envelope-from past@noc.ntua.gr) Message-ID: <4039EAC9.9090107@noc.ntua.gr> Date: Mon, 23 Feb 2004 13:58:01 +0200 From: Panagiotis Astithas Organization: NTUA/NMC User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040119 X-Accept-Language: en-us, en MIME-Version: 1.0 To: mina mina References: <20040222171440.53970.qmail@web40807.mail.yahoo.com> In-Reply-To: <20040222171440.53970.qmail@web40807.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-java@freebsd.org Subject: Re: Java Network problem X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2004 11:58:40 -0000 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