S
Sergio Juan
Hi.
We have a configuration program for a server where the IP of the local
machine is needed. We try to get it from InetAddress.getLocalHost(), but
sometimes it just returns 127.0.0.1 (the IP is passed to other servers so
they can connect with ours).
I have read about sun.net.spi.nameservice.provider and related properties,
but it looks like they are available only since version 1.4 (we need it
working on java 1.3.1). Am I right (in the fact that we cannot use
sun.net.spi.nameservice.provider in 1.3.1)? If I am, has anybody a idea of
how can we get the real IP of the localhost?
TIA. Sergio.
We have a configuration program for a server where the IP of the local
machine is needed. We try to get it from InetAddress.getLocalHost(), but
sometimes it just returns 127.0.0.1 (the IP is passed to other servers so
they can connect with ours).
I have read about sun.net.spi.nameservice.provider and related properties,
but it looks like they are available only since version 1.4 (we need it
working on java 1.3.1). Am I right (in the fact that we cannot use
sun.net.spi.nameservice.provider in 1.3.1)? If I am, has anybody a idea of
how can we get the real IP of the localhost?
TIA. Sergio.