code: public static String getHostName() {
          try {
              return java.net.InetAddress.getLocalHost().getHostName();
          } catch (java.net.UnknownHostException _ex) {
              return null;
          }
      }
docs: Gets the host name of the local machine.
  @return host name