Java RMI

Compile and Run Activatable

RMI machines
  1. Compile
    javac -d . *.java
  2. Run rmic
    rmic -d . examples.activation.ActivatableImplementation
  3. Start the registry. Make sure the CLASSPATH does not contain any classes that you want to download to client.
    rmiregistry &
  4. Start the activation daemon.
    rmid -J -Djava.security.policy=rmid.policy &
  5. Run the setup program. The codebase is a URL indicating where the stub code lives. Usually you will want this to be an http.
    java  -Djava.security.policy=/home/rmi_tutorial/activation/policy
     -Djava.rmi.server.codebase=http://dilbert.usc.edu/rmi_tutorial/activation/
     examples.activation.Setup
  6. Run the client.
    java -Djava.security.policy=/home/rmi_tutorial/activation/policy 
     examples.activation.Client vector

José M. Vidal .

19 of 22