home *** CD-ROM | disk | FTP | other *** search
/ Internet News 1999 October / INEWS_10_CD.ISO / pc / jdk / jdk1.2.2 / docs / guide / rmi / examples / stock / readme.txt < prev    next >
Encoding:
Text File  |  1999-09-19  |  2.0 KB  |  53 lines

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