1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
try {
System.setSecurityManager(new RMISecurityManager());
System.out.println("Démarrage Thread Client ");
Inter.Interface myInt = ( Inter.Interface ) Naming.lookup( serverObjectName );
System.out.println("Client connecté");
myInt.Connec();
if(Stat == 0) Admin=new Client_Admin(myInt);
else User=new Client_simple(myInt,Nom);
} catch (RemoteException ex) {JOptionPane.showMessageDialog(null, "Erreur réseau", "Erreur",JOptionPane.WARNING_MESSAGE);
System.exit(0);
} catch (MalformedURLException ex) {JOptionPane.showMessageDialog(null, "L'adresse est mal formée !!", "Erreur",JOptionPane.WARNING_MESSAGE);
System.exit(0);
} catch (NotBoundException ex) {JOptionPane.showMessageDialog(null, "Erreur", "Erreur",JOptionPane.WARNING_MESSAGE);
System.exit(0);
} |