Getting local host via InetAddress.getLocalHost() under Linux

Hi,

 

Whatever I do, Linux machines in my project throw an exception when calling java.net.InetAddress.getLocalHost().

Googling about it confirmed there's an issue here, ancient as the moon, but I could not find any solution.

This nasty behavior hinders initialization of ehcache and execution of jmeter tests, just to name a few places.

I stopped using it from my code altogether, but some code that uses it (as these two examples) resides in my 3rd party libraries.

 

Does anybody know of a fix to this issue? whether java-based or network configuration, any suggestion is welcome...

 

Thanks!

Zvika

 

Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com