try { MulticastSocket ms = new MulticastSocket(); System.out.println(ms); } catch (SocketException se) { System.err.println(se); } catch (IOException ioe) { System.err.println(ioe); }