home *** CD-ROM | disk | FTP | other *** search
/ Java Developer's Companion / Java Developer's Companion.iso / documentation / jdk113 / docs / guide / rmi / examples / stock / README.TXT < prev    next >
Encoding:
Text File  |  1997-08-16  |  1.9 KB  |  43 lines

  1. The docs/guide/rmi/examples/stock directory in the JDK 1.1 Beta
  2. installation directory contains an example that illustrates an applet
  3. that exports a remote object in order to receive stock updates from a
  4. stock server. The applet displays the stock data dynamically as
  5. notifications are received from the server. The interfaces/classes for
  6. this example are as follows:
  7.  
  8.    - StockWatch is the remote interface for stock server.
  9.  
  10.    - StockNotify is the remote interface for stock observer.
  11.  
  12.    - Stock is the serializable object containing stock data.
  13.  
  14.    - StockServer (implements StockWatch) sends notifications of stock
  15.      updates to remote objects that have registered to receive updates.
  16.  
  17.    - StockApplet (implements StockNotify) exports a remote object (itself), 
  18.      registers with StockServer for stock updates, and displays stock 
  19.      notifications as they are received.
  20.  
  21. On Solaris, after downloading the JDK 1.1 Beta release, execute the run
  22. script in the docs/guide/rmi/examples/stock directory, which will print
  23. out what it is doing while it runs the example.  The stock server
  24. creates its own registry, so the "rmiregistry" does not need to be
  25. started.  Here are the basic steps that the run script executes:
  26.  
  27. setenv CLASSPATH ../..:$CLASSPATH
  28. javac -d ../.. *.java
  29. rmic -d ../.. examples.stock.StockServer examples.stock.StockApplet
  30. java examples.stock.StockServer &
  31. appletviewer index.html
  32.  
  33. Note: you can set your CLASSPATH back to the old CLASSPATH (without
  34. ../.. in it) before running the appletviewer, so that classes get
  35. downloaded via the network rather than via CLASSPATH; each of the
  36. scripts actually does this.
  37.  
  38. On Windows systems, after downloading the JDK 1.1 Beta release, execute
  39. run.bat in the docs/guide/rmi/examples/stock directory, which will
  40. explain each step as it builds and runs the example.  Upon completion,
  41. you will need to explicitly destroy the window created for the server
  42. process.
  43.