Jay_

Java Remote Communication

Oct 30th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. import java.rmi.*;
  2.  
  3. /**
  4.  *
  5.  * @author Jay
  6.  */
  7. public class RMIClient {
  8.    
  9.     public static void main(String[] args)
  10.     {
  11.         try
  12.         {
  13.             RemoteServer s=(RemoteServer)
  14.             Naming.lookup("rmi://localhost/RMIServer");
  15.             s.helloYou();
  16.         }
  17.         catch ( Exception e )
  18.         {
  19.             System.out.println("Exception: " + e.getMessage());
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment