This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: java.net.InetAddress
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: java at gcc dot gnu dot org, Erik Poupaert <erik dot poupaert at chello dot be>
- Date: Fri, 27 Jun 2003 18:36:46 -0500
- Subject: Re: java.net.InetAddress
- Reply-to: gnustuff at thisiscool dot com
Erik,
I've had a chance to look into this at long last.
>What I'm actually interested in, is the address "192.168.0.2"; the one
>assigned to my machine by dhcpcd.
>
>Regardless of what I try, however, java.net.InetAddress will never
>return this address. It will always return the (absolutely useless)
>loopback address "127.0.0.1":
On my WinXP machine, both the JDK 1.4.1_01 and a recent unpublished
GCJ 3.4 build produce identical results:
local ip: 192.168.10.14
localhost: p733
getByName:192.168.10.14
address count: 1
ip:192.168.10.14
On my Linux box, the JDK 1.4.1-rc-b19 produces this:
local ip: 127.0.0.1
localhost: p450.veganteam.com
getByName:127.0.0.1
address count: 1
ip:127.0.0.1
So in both cases, it appears that GCJ is consistent with the JDK.
I don't have Linux or MingW 3.3 builds handy, but I expect
the results to be similar.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/