You can run both the server and client applications on the same machine,
you must use rmic in the jdk to generate stubs when compiling your project, and for running the project, you must use rmiregistry before calling java, and for running server, use -server option.
hope it can help you .