Generate the Stubs

The client-side scenario uses rmic generated stubs for the remote classes. For the client application PurseClient to execute correctly on the terminal, it needs these remote stub classes and the remote interface class files it uses to be accessible in its classpath.

The stub class PurseImpl_Stub.class for the PurseImpl class is produced by running the standard JDK compiler. The directory where you installed the developer's kit is indicated by JC_HOME_SIMULATOR. For example, from the examples/purse directory, enter the following command:

rmic -classpath ../..;%JC_HOME_TOOLS%/lib/tools.jar -d ../.. 
-v1.2 examples.purse.PurseImpl

This produces a stub class called examples.purse.PurseImpl_Stub.

For PurseClient to run correctly on the terminal, the following files must be present in the examples/purse directory and accessible either from its classpath or from class loaders:

  • PurseImpl_Stub.class

  • Purse.class