I call Inet4Address.getByName("localhost") , expecting to see 127.0.0.1 , but instead I see my IP address assigned to my ethernet / airport. If I disconnect my ethernet / airport, I will get permission 127.0.0.1 , but as soon as I reconnect it will resolve the ethernet / airport IP address.
I am using OSX 10.6.7 and the java version is "1.6.0_24". My / etc / hosts file has "127.0.0.1 localhost" . Ping localhost in the terminal does allow 127.0.0.1.
I need this because I am developing a GWT where I have another JVM trying to call GWT Hosted Mode and I get a ConnectionException: the connection is rejected if localhost does not allow 127.0. 0.1.
thanks
source share