public class HostnameUtils extends Object
|Modifier and Type||Method and Description|
Gets the name which is likely to be the local host's primary name on the network.
public static String getNetworkHostname() throws NativeException
gethostname()function from the standard C Library.
Ws2_32library. (without domain name). Note that this Windows function will do a name service lookup and the method is therefore potentially blocking, although it is more than likely that Windows has cached this result on computer startup in its DNS Client Cache and therefore the result will be returned very fast.
NativeException- if there was an error executing the system call.