SHARE
TWEET

Untitled

a guest Mar 26th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. import java.rmi.*;
  4. import java.rmi.registry.*;
  5. import java.io.*;  
  6.  
  7. public class Client {
  8.     public static void main(String args[]) throws Exception {
  9.  
  10.          try{    
  11.  
  12.  
  13.            
  14.             System.setProperty("java.rmi.server.hostname","192.168.1.107");  
  15.            
  16.             Registry reg = LocateRegistry.getRegistry("192.168.1.107",1098);
  17.             String name = "value";
  18.             RmiServerIntf obj = (RmiServerIntf) reg.lookup(name);  
  19.             fw.write(obj.getMessage());
  20.             obj.writeMessage("JR");
  21.             fw.write(obj.getMessage());
  22.             fw.close();
  23.           } catch(Exception e) {
  24.                 System.out.println(e);
  25.           }    
  26.  
  27.  
  28.        
  29.        
  30.        
  31.        
  32.     }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top