Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Client
- package client;
- import java.rmi.Naming;
- import java.rmi.RemoteException;
- import barriere.Barriere;
- import barriere.BarriereInt;
- public class Client extends Barriere {
- public Client() throws RemoteException {
- super();
- }
- public static void main(String[] args) {
- try {
- BarriereInt b = (BarriereInt)Naming.lookup("rmi://localhost:1099/barriere");
- if(b.entre()) {
- System.out.println("Entree Success");
- } else {
- System.out.println("FULL");
- }
- } catch (Exception e) {
- System.out.println(e.toString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement