My Oracle Support Banner

[Java SE] Does InetAddress.getLocalHost Require Access to /etc/hosts? (Doc ID 2327419.1)

Last updated on NOVEMBER 15, 2020

Applies to:

Java SE JDK and JRE - Version 8 to 9
Generic Linux
Generic UNIX


Is read access to the /etc/hosts file on a Linux or Unix system needed by the InetAddress.getLocalHost() method?


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.