RMI Steps

 

To get RMI to work between an Applet and a Servlet:

  1. Install Java 1.3. (http://java.sun.com/j2se/)
  2. Install serveletapi. (http://java.sun.com/products/servlet/2.1/)
  3. Set (familiar) environment variables:
    1. path (pick-up 1.3 bin directory).
    2. classpath (pick-up rt.jar, jaws.jar, and servlet.jar, as well as current directory).
  4. Set (unfamiliar) environment variable:  [not clear this has any effect]
    1. java.rmi.server.codebase (URL to _Stub and _Skel files). 
  5. Update jdk1.3/jre/lib/security/java.policy file in (add the line: permission java.security.AllPermission;) [not clear this has any effect]
  6. Compile servlet classes (Int, Impl, and Servlet files)
  7. Generate _Stub and _Skel classes, using rmic.
  8. Copy servlet-related .class files to servlet directory.
  9. Copy Int, _Stub, and _Skel classes to applet directory.
  10. Compile applet classes.
  11. Copy applet, Int, _Stub, and _Skel classes to WWW-accessible applet directory.
  12. Start WWW server with servlet engine (e.g., Tomcat).
  13. Start rmiregistry from servlet directory.
  14. Note:  Will work as-is for Netscape (Netscape 4.7 includes 1.1.5 jdk rmi classes internally and 6.0 includes 1.3 classes), but must set local classpath to include jdk 1.1.8 classes.zip in order to get Internet Explorer to work (IE does not work with 1.2 or 1.3 classes).

Note that steps 4 and 5 don't seem to have any effect but are called for by the documentation (or a close approximations since servlet engine can't be started with prescribed command line definition of codebase).