log.error(ex);
System.err.println(ex);
    public static void main(String args[]) {        MulticastSocket sock;        InetAddress mcast_addr=null, bind_addr=null;        DatagramPacket packet;        byte[] buf=new byte[0];        String tmp;        int ttl=32;        String line;        DataInputStream in;        AckReceiver ack_receiver=null;        int port=5555;        try {            for(int i=0; i < args.length; i++) {                tmp=args[i];                if("-help".equals(tmp)) {                    help();                    return;                }                if("-bind_addr".equals(tmp)) {                    bind_addr=InetAddress.getByName(args[++i]);                    continue;                }                if("-mcast_addr".equals(tmp)) {                    mcast_addr=InetAddress.getByName(args[++i]);                    continue;                }                if("-ttl".equals(tmp)) {                    ttl=Integer.parseInt(args[++i]);                    continue;                }                if("-port".equals(tmp)) {                    port=Integer.parseInt(args[++i]);                    continue;                }                help();                return;            }            if(mcast_addr == null)                mcast_addr=InetAddress.getByName("224.0.0.150");        }        catch(Exception ex) {            log.error(ex);            return;        }        try {            sock=new MulticastSocket(port);            sock.setTimeToLive(ttl);            if(bind_addr != null)                sock.setInterface(bind_addr);            System.out.println("Socket=" + sock.getLocalAddress() + ':' + sock.getLocalPort() +                               ", ttl=" + sock.getTimeToLive() + ", bind interface=" + sock.getInterface());            ack_receiver=new AckReceiver(sock);            ack_receiver.start();            in=new DataInputStream(System.in);            while(true) {                System.out.print("> ");                line=in.readLine();                if(line.startsWith("quit") || line.startsWith("exit")) {                    if(ack_receiver != null)                        ack_receiver.stop();                    break;                }                buf=line.getBytes();                packet=new DatagramPacket(buf, buf.length, mcast_addr, port);                sock.send(packet);            }        }        catch(Exception e) {            log.error(e);        }    }