chat rmi server/client and peer2peer
This commit is contained in:
29
rmi_chat/LaunchServer.java
Normal file
29
rmi_chat/LaunchServer.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package rmi_chat;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.registry.LocateRegistry;
|
||||
import java.rmi.registry.Registry;
|
||||
|
||||
/**
|
||||
* Created by Giovanni on 10/12/2014.
|
||||
*/
|
||||
public class LaunchServer {
|
||||
|
||||
public static void main (String[] args ){
|
||||
|
||||
try {
|
||||
ChatInterface cs = new ChatServer();
|
||||
Registry r = LocateRegistry.getRegistry();
|
||||
r.rebind("serverchat",cs);
|
||||
|
||||
|
||||
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user