Compile Class Files
The next step is to compile the files just created. I am assuming that
all source files are in a directory named Greater.
Compile the source files using the command line:
c:\Greater> javac *.java
Create Stub and Skeleton classes using RMIC
c:\Greater> rmic GreaterServerImpl
Start the RMI registry,
server, and client
Starting the Registry
c:\Greater> start rmiregistry
or
c:\Greater> rmiregistry
Starting the Server
c:\Greater> start java GreaterServerImpl
or
c:\Greater> java GreaterServerImpl
If the server is successfully started, it will print the messages "Creating
server object".
Starting the Client
c:\Greater> java GreaterClient
Your
first GUI program
Figure 4.2

Type two numbers and click the compare button.

In this chapter, we have created an application that explicitly exports
a remote object.
|