Most likely the entry for "localhost" in the hosts file (/etc/hosts for Linux/Unix/Solaris) is defective. Windows has a hosts file, too, but I'm not sure if it uses it to get localhost.
I think Eric has a different problem. Java apps that want the server's IP address (assuming it only has one) can't get it from reverse lookups on "localhost", so sometimes the apps have to be explictly configured.
An IDE is no substitute for an Intelligent Developer.