public static void main(String[] args) {

		System.out.println("Lancement du client");

		try {
			Remote r = Naming.lookup("rmi://"
					+ InetAddress.getLocalHost().getHostAddress()
					+ "/messagerieRMI");

			if (r instanceof Messagerie) {
				
				Messagerie irc = (Messagerie) r;
				ActionsClientMessagerie client = new ActionsClientMessagerie(
						irc, 1);

				// Affichage de la fenetre
				Fenetre fen = new Fenetre(client);

				// Initialisation de la récup des messages
				Timer recupTimer = new Timer();
				
				RecupMessages recupMessages = new RecupMessages(client, fen);
				
				recupTimer.scheduleAtFixedRate(recupMessages, 0, 1000);
			}

		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (NotBoundException e) {
			e.printStackTrace();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}

	}