blob: 695fafbafeef73ed8fbf359cda462ae7e6fcd708 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package pokemon;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import models.CONSTS;
public class Server {
public static void main(String[] args) {
try {
IService s=new Service();
System.out.println("created registry at 5555");
LocateRegistry.createRegistry(5555);
Naming.rebind(CONSTS.rmiUrl, s);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
|