Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Nelson Minar
one more datapoint - I have localhost as the first entry in /etc/hosts (where it belongs, I might add), but the test program correctly prints out pinotnoir.media.mit.edu/18.85.16.104 What's the difference? I'm not running glibc, I'm using libc5. My system is a mostly-Redhat-4.1 system with libc-5

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Geoffrey S. Knauth
Karl, I got a different result. When I've typed `hostname' on my GNU/Linux machine, I've always gotten "zhivago.bbn.com", never "localhost". When I first ran John Zinky's one-line test program, I got localhost/127.0.0.1. When I put the "zhivago" line in /etc/hosts above the "localhost" line,

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Karl Asha
The answer is pretty simple. The JDK finds out its information using gethostname(). This information is something that's been previously set at system boot up with the sethostname syscall. The problem isn't really the jdk, it's how your system is setup. If you type 'hostname' on the command line,

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Per Widerlund
[EMAIL PROTECTED] wrote: > I'll bet that the first line in your /etc/hosts is: > > 127.0.0.1 localhost localhost.localdomain > > At least, that's the way it was with mine and, when I tried your program, I > got the same "broken" answer you got. After reading Per's message, I moved

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread ptoscano
John, I'll bet that the first line in your /etc/hosts is: 127.0.0.1 localhost localhost.localdomain At least, that's the way it was with mine and, when I tried your program, I got the same "broken" answer you got. After reading Per's message, I moved that line below the second

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread David Lucas
On my box using java version "Sergey_Nikitin:12/21/97-23:13" and glibc2 ( /lib/libc-2.0.5.so) the java.net.InetAddress.getLocalHost() returns the name configured by the "hostname " command. Which also is looked up for the IP address in the /etc/hosts file (not sure if it uses DNS or not), b

Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Geoffrey S. Knauth
Does anyone out there on the blackdown list have knowledge of this bug/feature? Geoffrey S. Knauth http://world.std.com/~gsk > From: "John A. Zinky" <[EMAIL PROTECTED]> We have not been able to

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Joe Carter
Stephen Wynne wrote: > > In message <[EMAIL PROTECTED]>, "John A. Zinky" > writes: > > We have not been able to find a configuration of Linux Red Hat 5.0 and > jdk 1.1.x that works for the following one line test program. > > John, I tried this code on RH5 myself; same result. > Change

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Stefan Andreasen
ubject: Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works >John A. Zinky wrote: >> We have not been able to find a configuration of Linux Red Hat 5.0 and >> jdk 1.1.x that works for the following one line test program. >> >> public class TestGetLo

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread B. Craig Taverner
> > System.out.println(java.net.InetAddress.getLocalHost()); > It works fine for me: RedHat 5.0 and jdk1.1.6-v1 (sbb). Make sure you Also works for me: Debian1.3.1, libc5.4.33 (no glibc), kernel2.0.33, jdk1.1.3. Could it be a glibc bug? Cheers, Craig -- The sooner you fall behind, t

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Stephen Wynne
In message <[EMAIL PROTECTED]>, "John A. Zinky" writes: We have not been able to find a configuration of Linux Red Hat 5.0 and jdk 1.1.x that works for the following one line test program. John, I tried this code on RH5 myself; same result. In message <[EMAIL PROTECTED]>, Per Wi

Re: Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread Per Widerlund
John A. Zinky wrote: > We have not been able to find a configuration of Linux Red Hat 5.0 and > jdk 1.1.x that works for the following one line test program. > > public class TestGetLocalHost { > public static void main(String[] args) { > try { > System.out.println(java.net.InetAddres

Need a Java/Linux RedHat 5.0 configuration where getLocalHost works

1998-06-17 Thread John A. Zinky
We have not been able to find a configuration of Linux Red Hat 5.0 and jdk 1.1.x that works for the following one line test program. public class TestGetLocalHost { public static void main(String[] args) { try { System.out.println(java.net.InetAddress.getLocalHost()); } catch (Ex