java.net.InetAddress
Erik Poupaert
erik.poupaert@chello.be
Sat Jun 21 10:33:00 GMT 2003
> I really wonder why your test output 127.0.0.1. Can you send me your
> /etc/hosts file ? I think its borked.
On the one side, I guess you're right:
# /etc/hosts: This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.7 2002年11月18日 19:39:22
# azarah Exp $
#
127.0.0.1 localhost
127.0.0.1 linuxpresario.mydomain.com linuxpresario
On the other side, however, I get my ip address through dhcpcd (from an ancient win98
machine that has two network interfaces with internet connection sharing, and is
historically my gateway to the internet. Still haven't had time to install linux on
this ancient machine and configure iptables to replace this setting ... By the way,
iptables is really not for the weak of heart ...)
If I have to rely on /etc/hosts to be configured correctly for this piece of source
to work properly on both windows and linux... Then, this piece of source may work on
the one half of the machines and fail on the other. It's very easy to completely
swamp the client's support resources with this kind of tasks (4 people); then, they
will start clamouring again for additional staff (at California salary rates), and
next, the client will take it out on me... Been there, done that.
Lastly, even though I'm developing and testing on lin32, the deployment target on the
client side is win32; and my win2k test laptop also returns "127.0.0.1". I can't
depend on any such local file to be configured properly for the software to work
properly. It has to work properly, regardless; or else I shouldn't deploy.
More information about the Java
mailing list