Advertisement
Guest User

Untitled

a guest
Sep 25th, 2020
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. import java.rmi.*;
  2. import java.net.*;
  3. import java.rmi.registry.LocateRegistry;
  4.  
  5. public class Server
  6. {
  7. public static void main(String args[]) throws Exception
  8. {
  9. new Server();
  10. }
  11. public Server(){
  12. try{
  13. System.out.println("Server running");
  14. ServerImpl locobj=new ServerImpl();
  15. Naming.rebind("rmi:///ClientInterface",locobj);
  16. }
  17. catch(RemoteException re){
  18. re.printStackTrace();
  19. }
  20. catch(MalformedURLException mfe){
  21. mfe.printStackTrace();
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement