public static String getHostnameOrAddress ( ) { final InetAddress addr = m_localAddressSupplier . get ( ) ; if ( addr == null ) return "" ; return ReverseDNSCache . hostnameOrAddress ( addr ) ; }
Return the local hostname if it s resolvable . If not return the IPv4 address on the first interface we find if it exists . If not returns whatever address exists on the first interface .