Skip to content

A Java Remote Method Invocation example implementation

Notifications You must be signed in to change notification settings

riventop/javarmi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

javarmi

A Java Remote Method Invocation example implementation

Step 1

Navigate to the order directory.

Step 2

Compile all the files in the the directory, using this command in a cmd window.

javac *.java

Step 3

Type this in the cmd window to start the RMI registry in Windows:

start rmiregistry

and this in Linux/Unix:

$ rmiregistry &

Note: it is important that you run this command int the order directory or where your class files were generated from the previous step. It wil not work otherwise. In Linux you can check this by running the command:

$ps 

Step 4: Starting the Server and Client

Starting the Server

To Start the Server,execute the Server.java file using this command a command line window:

java Server

This should start the server and output a 'Server ready' message in the command window. If this doesn't work make sure that the RMI registry daemon is running in the directory where your classes were generated.

Starting the Client

Open another command window in the same directory and execute the Client file like so:

java Client

This should not produce an output. If it reports connection refused error, again, make sure the RMI registry is running. If this is successful you should see some output in the window that you run the Server.

Note: This will bind the current output to the registry. If you change anything, you will need to end/kill the rmiregistry process and repeat the process from Step 3.

About

A Java Remote Method Invocation example implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages