Solution:
The following steps must be involved in order for a RMI program to work properly:
Compilation of all source files.
Generation of the stubs using rmic.
Start the rmiregistry.
Start the RMIServer.
Run the client program.
Credit: 3870