@@ -0,0 +1,1033 @@
+package Serveur;%0A%0Aimport java.net.InetAddress;%0Aimport java.net.NetworkInterface;%0Aimport java.net.SocketException;%0Aimport java.net.UnknownHostException;%0Aimport java.rmi.RemoteException;%0Aimport java.rmi.registry.LocateRegistry;%0Aimport java.rmi.registry.Registry;%0Aimport java.util.Enumeration;%0Aimport java.util.Properties;%0A%0Apublic class Serveur %7B%0A%09%0A%09public static String getAdresseLocale() throws SocketException %7B%0A%09%09InetAddress adr = null ;%0A%09%09Enumeration%3CInetAddress%3E listAdr =%0A%09%09NetworkInterface.getByName(%22eth0%22).getInetAddresses();%0A%09%09while (listAdr.hasMoreElements())%0A%09%09adr = listAdr.nextElement();%0A%09%09return adr.getHostAddress() ;%0A%09%7D%0A%09%0A%09public static void main(String%5B%5D args) throws SocketException, RemoteException, UnknownHostException %7B%0A%09%09Properties prop = System.getProperties();%0A%09%09prop.put(%22java.rmi.server.hostname%22, getAdresseLocale());%0A%09%09%0A%09%09Registry registre;%0A%09%09registre = LocateRegistry.createRegistry(1099);%0A%0A%09%09CAdresseIP adresseIp = new CAdresseIP(getAdresseLocale());%0A%09%09%0A%09%09registre.rebind(%22adresseIp%22, adresseIp);%0A%09%7D%0A%0A%7D%0A

Create Serveur.java