Hello Michael,
Thank you for replying so quickly..
The particular address in my message was a bogus address.. I was
assuming that would be clear when I mentioned the whatever.home.edu. In
anycase, yes, my DNS is setup properly, as 'nslookup' and 'host' both
return a hostname and address... in particular,
for IP = 206.19.60.13 I get
hostname = chinook.tenthmtn.com
but the Java program in my previous message does not work. I believe it
is capable of doing the reverse lookup... as is my understanding...
instantiation of the InetAddress object fails if reverse lookup is to
fail. However, my program continues to execute to the point where it
calls the getHostName() method. So, to me that means that the object was
successfully instantiated... which leads me to conclude that reverse
lookup was successful. However, the getHostName method returns the ip
address in string representation instead of the hostname. It seems to me
that the InetAddress object is instantiated, the ipString accepted, the
reverse lookup successful, but the hostname is not stored in
InetAddress.
In case this matters, I am on Redhat 5.1 Linux kernel 2.0.35. I've used
both JDK 1.0.2 and JDK 1.1.5.
You mention that you are able to do reverse lookup on your machine. What
platform are you on? And did you use the code in my previous message or
some other Java program? My java program DOES work on windows 95 and
Windows NT platforms... it DOESN'T WORK ONLY ON Linux.
Thanks for any furthur help if you can.
Bond Masuda
Global Integrity Corp. (an SAIC company)
[EMAIL PROTECTED]
-----Original Message-----
From: Michael Sinz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 10, 1998 2:11 PM
To: [EMAIL PROTECTED]; Masuda, Bond
Subject: Re: Java on Linux... bug in InetAddress ??? please help!
On Thu, 10 Sep 1998 13:34:08 -0700, Masuda, Bond wrote:
>Hello,
>
>I am having trouble getting reverse DNS lookups to work on Linux.
>Following is a snip of the code... this works on Windows 95, Windows
NT,
>but not on Linux. The problem is that the getHostName method returns
the
>ipString instead of the hostname... i.e., it returns something like
>10.2.6.15 instead of whatever.home.edu. The JDK version seems to not
>matter in this particular case... so I don't believe that is an issue.
I
>am wondering if this might be a bug in the port of Java to linux.
First - have you tried that address in nslookup?
Just type:
nslookup 10.2.6.15
If this does not return the name of the host then the problem is that
you either do not have the DNS setup or it is set up wrong or the host
really does not have a name.
[...]
>I would appreciate any help on this issue. Thanks in advance.
I wish I could help you more but on my machine your address does not
work but address on the net, such as 204.146.18.33 do work. (That
should return something like www.ibm.com if I remember correctly...)
Michael Sinz -- Director of Research & Development, NextBus Inc.
mailto:[EMAIL PROTECTED] --------- http://www.nextbus.com
My place on the web ---> http://www.users.fast.net/~michael_sinz