import java.net.*;
import java.io.IOException;

public class UdpClient {
  java.text.DateFormat DF = null;
  public static void main(String[] args) {
    try { 
      DatagramPacket dp = new DatagramPacket(new byte[20],
                    20, InetAddress.getLocalHost(), 4711);
      DatagramSocket ds = new DatagramSocket();
      ds.send(dp);
      ds.receive(dp);
      System.out.println(new String(dp.getData()));
	} catch (UnknownHostException e) { e.printStackTrace();}
	  catch (SocketException e) { e.printStackTrace();}
	  catch (IOException e) { e.printStackTrace();}
  }
}
