From owner-freebsd-questions Mon Apr 8 13:53:16 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mrami.homeunix.org (cvg-65-27-234-39.cinci.rr.com [65.27.234.39]) by hub.freebsd.org (Postfix) with ESMTP id 61B8837B404 for ; Mon, 8 Apr 2002 13:53:10 -0700 (PDT) Received: from localhost (mrami@localhost) by gateway.mrami.com (8.11.6/8.11.6) with ESMTP id g38D4M104840 for ; Mon, 8 Apr 2002 09:04:22 -0400 (EDT) (envelope-from mrami@mrami.homeunix.org) Date: Mon, 8 Apr 2002 09:04:21 -0400 (EDT) From: Marc Ramirez X-X-Sender: mrami@gateway.mrami.com To: freebsd-questions@freebsd.org Subject: Stupid Java question re. NS lookups Message-ID: <20020408085012.E4705-100000@gateway.mrami.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I have this java program that does NS lookups import java.net.*; public class nlookup { public static void main(String args[]) { try { System.out.println(InetAddress.getByName(args[0])); } catch(Exception e) { e.printStackTrace(); } } } Now, if I take the linux j2sdk (I'm using 1.4.0) and compile and run it on my linux box, I get output like this: [mrami@s199 mrami]$ java nlookup ftp.freebsd.org ftp.freebsd.org/62.243.72.50 [mrami@s199 mrami]$ On my FreeBSD system (FreeBSD 4.5-RC1), when I do the same thing, mrami@gateway:~/src/test$ java -cp . nlookup ftp.freebsd.org java.net.UnknownHostException: ftp.freebsd.org at java.net.InetAddress.getAllByName0(InetAddress.java:920) at java.net.InetAddress.getAllByName0(InetAddress.java:890) at java.net.InetAddress.getAllByName(InetAddress.java:884) at java.net.InetAddress.getByName(InetAddress.java:814) at nlookup.main(nlookup.java:6) mrami@gateway:~/src/test$ (Yes, same nameserver) Is this nature's way of telling me I need to use the native SDK? Or am I doing something stupid? Marc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message