The proposed interface CalculatorIF implements/extends Remote, an empty interface or marker, defined in the java.rmi package. Why is this marker needed? If CalculatorIF does not implement/extend Remote, then, when the "rmic" utility is executed on Calculator, the class that implements interface CalculatorIF, the following error is reported:
error: Stubs are only needed for classes that directly implement an interface that extends java.rmi.Remote; class Calculator does not directly implement a remote interface.
antoy@greystar:$ ./cmd.pl
Compiling on host greystar
Removing old class files
Compiling all java files
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running rmic to create Stub and Skel
Warning: generation and use of skeletons and static stubs for JRMP
is deprecated. Skeletons are unnecessary, and static stubs have
been superseded by dynamically generated stubs. Users are
encouraged to migrate away from using rmic to generate skeletons and static
stubs. See the documentation for java.rmi.server.UnicastRemoteObject.
Make sure there is a route to remote host
*** script does not check ***
Running the registry
Starting remote program
Sleeping 10 secs. (you should see "Server: Calculator bound")
Server: Calculator bound
Starting client
Client: Calculator result: 7.7
Remember to kill remote program and registry
antoy@greystar:$