Accessing an Eclipse Server using IP address
June 29, 2010
Posted by on
A while ago I got stuck after upgrading to Eclipse 3.5 – suddenly I couldn’t access my server using the IP address or host name of the machine, but localhost and 127.0.0.1 worked fine.
For me this was a bigger issue as my host was a virtual machine (vmware) and I wanted to access the server from outside that virtual machine (in this case for testing a GWT app with different versions of IE).
Turns out that prior to Eclipse 3.5 the server launch config didn’t set the –host property automatically. So even if you put localhost as the in the “host name” field in the server configuration, you could still access the server using the hosts IP address.
Eclipse 3.5 now adds a –host property automatically, causing any old configs to now only serve to localhost.
To fix this set the “host name” field (or –host property in the launch config) to 0.0.0.0 (to listen on all interfaces). Back to work again…