Distinct ONC RPC/XDR for Java Demo

To run the demo of Distinct ONC RPC/XDR for Java, you must first install the distribution files (Java class files) as described on the previous page. Please make sure that the parent directory of the distinct/rpc class directory has been added to the Java CLASSPATH.

Then, start the "counter" RPC server on the machine that also hosts the Distinct RPC for Java demo files. This is accomplished by running the provided demo server "docount.class" with your Java interpreter.

If you want to run a demo with a native RPC server, you can build the native server with your local RPC environment using the server implementation "count.c". For a native ONC RPC/XDR implementation for Windows 95 and Windows NT, connect to the Distinct web site. Before running the native RPC server, please make sure that the RPC port mapper is up and running..

Application Demo

Start the demo client application by running "couTest.class" with your Java interpreter. The demo makes three RPCs to increment the counter on the server and three RPCs to decrement the counter. After each RPC the current value of the counter is displayed.

Applet Demo

Start the demo client applet by opening the demo page in your browser. The demo page contains an instance of the demo applet which will invoke the server each time you click on it. The applet reports the reply of each call as well as any error conditions.

Please note that the applet demo will not work properly with the trial version of Distinct ONC RPC/XDR Toolkit for Java.

Port Mapper Demo

The "PmapTest.class" sample program contacts the port mapper on the local machine and checks if the demo server is currently running. If the demo server is registered with the local port mapper, then the sample program will display the port on which the server is running.

Broadcast Demo

The "BroadcastTest.class" sample program demonstrates how to use broadcast RPCs to locate a server. The sample keeps sending broadcast messages to all NFS servers on the local subnet until it receives an answer. It then prints the host name and IP address of the responding server.

Secure RPC Demo

Two additional sample programs demonstrate how to use secure RPC with AUTH_DES authentication. The "SecureServer.class" sample program is a modified version of the "docount.class" sample and the "SecureClient.class" sample program is based on the "couTest.class" sample. The only difference from the original samples described above is that these two samples make use of AUTH_DES authentication.