// Récupération de l'adresse IP et du port
InetAddress server = InetAddress.getByName(args[0]) ;
int port = Integer.parseInt(args[1]) ;
InetSocketAddress isa = new InetSocketAddress(server, port) 
// Création d'un objet canal UDP non attaché
DatagramChannel dc      = DatagramChannel.open() ;
// Les données   à envoyer doivent être dans un ByteBuffer
ByteBuffer bb    =   ByteBuffer.wrap("Hello".getBytes()) ;
// L'attachement de la socket UDP sous-jacente est implicite
dc.send(bb,isa) ;
dc.close() ;
