Date: Mon, 8 Apr 2002 09:04:21 -0400 (EDT) From: Marc Ramirez <mrami@mrami.homeunix.org> To: freebsd-questions@freebsd.org Subject: Stupid Java question re. NS lookups Message-ID: <20020408085012.E4705-100000@gateway.mrami.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020408085012.E4705-100000>