Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.rmi.*;
- import java.net.*;
- import java.rmi.registry.LocateRegistry;
- public class Server
- {
- public static void main(String args[]) throws Exception
- {
- new Server();
- }
- public Server(){
- try{
- System.out.println("Server running");
- ServerImpl locobj=new ServerImpl();
- Naming.rebind("rmi:///ClientInterface",locobj);
- }
- catch(RemoteException re){
- re.printStackTrace();
- }
- catch(MalformedURLException mfe){
- mfe.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement