Inetaddress.getLocalHost() UnknownHostException Windows 8

386 views Asked by At

I am attempting to use Elastic Search in a Spring program. Currently I am trying to create a Transport Client as per this guide. Unfortunately the InetAddress.getByName("localhost") is giving me an

unhandled exception type UnknownHostException

I have also tried using InetAddress.getLocalHost() and have received the same error.

I am on a Windows 8 machine and I have changed my host file as detailed in this answer. If anyone has any ideas please let me know. Thank you.

0

There are 0 answers