Õ¾ÄÚËÑË÷: ÇëÊäÈëËÑË÷¹Ø¼ü´Ê
µ±Ç°Ò³Ãæ: ÔÚÏßÎĵµÊ×Ò³ > JDK 5 Documentation v1.2.2, Java 2 SDK Ó¢ÎÄÎĵµ

Stock Example Using RMI - JDK 5 Documentation v1.2.2, Java 2 SDK Ó¢ÎÄÎĵµ

JavaSoft, a Sun Microsystems Business

Stock Example Using RMI

Contents of the
Java® 2 SDK,
Standard Edition,
v 1.2

This directory contains an example that illustrates an applet that exports a remote object in order to receive stock updates from a stock server. The applet displays the stock data dynamically as notifications are received from the server. The interfaces and classes for this example are:

On Windows systems, after downloading the JDKTM 1.2.2 release, execute run.bat in the docs/guide/rmi/examples/stock directory, which will explain each step as it builds and runs the example. Upon completion, you will need to explicitly destroy the window created for the server process.

On Solaris, after downloading the Java® 2 SDK, Standard Edition, v1.2.2, execute the run script in this examples/stock directory, and the script will print out what it is doing while it runs the example. It assumes that you have installed the Java® 2 SDK, Standard Edition, v1.2.2 and set your PATH, CLASSPATH and LD_LIBRARY_PATH according to the SDK installation instructions. The stock server creates its own RMI registry, so the "rmiregistry" command does not need to be run. Here are the basic steps that the run script executes:

Note: You can set your CLASSPATH back to the old CLASSPATH (without ../.. in it) before running the appletviewer, so that classes get downloaded from the network rather than from your CLASSPATH; each of the scripts actually does this.


Sun Copyright © 1996,1997,1998,1999 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA 94043-1100 USA. All rights reserved.