import java.net.* ; import java.rmi.* ; public class Serveur { public static void main(String [] args) { if (args.length != 1) { System.out.println("Usage : java Serveur "); System.exit(0); } try { MessageImpl objLocal = new MessageImpl (); Naming.rebind("rmi://localhost:1099/Message",objLocal) ; System.out.println("Serveur pret"); } catch (RemoteException re) { System.out.println(re) ; } catch (MalformedURLException e) { System.out.println(e) ; } } }