Java Host Name Get getLocalCanonicalHostName()

Here you can find the source of getLocalCanonicalHostName()

Description

get Local Canonical Host Name

License

Apache License

Declaration

public static String getLocalCanonicalHostName() throws UnknownHostException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.InetAddress;

import java.net.UnknownHostException;

public class Main {
    public static String getLocalCanonicalHostName() throws UnknownHostException {
        InetAddress localMachine = InetAddress.getLocalHost();
        return localMachine.getCanonicalHostName();
    }/*from  ww  w  . j av a  2s . co  m*/
}

Related

  1. getHostNameByInet()
  2. getHostNameByNic()
  3. getHtmlSource(final String host)
  4. getInetHost()
  5. getLedgerAllocatorPoolName(int serverRegionId, int shardId, boolean useHostname)
  6. getLocalShortHostName()
  7. getLogHost()
  8. getMachineHostname()
  9. getMyHostname()