Java RMI

Running

  1. Compile sources:
    javac -d . *.java
  2. Use rmic (not in JDK 1.5) to generate stub and skeleton .class files from the implementation and interface:
    rmic -d . examples.hello.HelloImpl
  3. Move hello.html to a webserver (along with the .class files), or use the appletviewer.
  4. Start the rmi registry on the server:
    rmiregistry &
  5. Start the server. Specify the codebase and policy to the stub class can be dynamically downloaded to registry.
    java  -Djava.rmi.server.codebase=http://myhost/~myusrname/myclasses/  
        -Djava.security.policy=$HOME/mysrc/policy  examples.hello.HelloImpl
  6. Run the applet (from a browser or with the appletviewer).

José M. Vidal .

9 of 22