public class Hostname
extends Object
There are Microsoft IE java versions that return the useless result "localhost".
System.out.println("TCP/IP hostname is " + Hostname.getHostname() );
Modifier and Type | Field and Description |
---|---|
static String |
hostname |
static InetAddress |
myIP |
Constructor and Description |
---|
Hostname() |
Modifier and Type | Method and Description |
---|---|
static String |
getHostname()
obtain the cached hostname value
|
String |
toString() |