public static String getHostName() {
        String out = "No IP";
        try {
            Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
            while (interfaces.hasMoreElements()) {

                NetworkInterface current = interfaces.nextElement();
                out = current.toString();
                if (!current.isUp() || current.isLoopback() || current.isVirtual()) {
                    continue;
                }
                Enumeration<InetAddress> addresses = current.getInetAddresses();
                while (addresses.hasMoreElements()) {
                    InetAddress current_addr = addresses.nextElement();
                    if (current_addr.isLoopbackAddress()) {
                        continue;
                    }
                    out += " "+current_addr.getHostAddress();
                }

            }
        } catch (SocketException ex) {
            Logger.getLogger(ScheduledPublicher.class.getName()).log(Level.SEVERE, null, ex);
        }
        return out;
    }