Once you have created the class implementing the server, ArithImpl.class, you can generate the corresponding stub and skeleton with the rmic compiler provided with the JDK.
To make things more concrete, suppose that the package is named mahmoud.ch8 and the directory is
Then you open a DOS window on the rmi directory and type
rmic -d . mahmoud.ch8.ArithImpl
N.B. rmic works on .class files, not .java files. So run javac first!
This creates ArithImpl_Stub.class and ArithImpl_Skel.class and puts them in the ch8 directory where the ArithImpl.class file also lives. (That's the point of the -d . )
Often these files are moved elsewhere (for example, the stub file might be moved to a directory accessible to a web server). In this example, they can be left where they are.