How Do You Run A RMI Program In Java Application?


2 Answers

Connor Sephton Profile
Connor Sephton answered
Like with most things, running a RMI file in Java is quite easy once you know how. However an element of prior knowledge is required.
To run an RMI file in Java just follow the steps below.
The first thing you will have to do is to pull together all the interfaces and kinds of servers you have as well as your client programmes.

Once this is done you will need to generate stubs and skeletons for remote programmes. This would be your server or if your communication is one way from the client to the server. Do this by using the following command.

To run the RMI registry by command type in
>start rmiregistry

Then you can run your server programme by typing in the command:
>start java
To call in your required methods on the server programme just start your client programme.

Your Java file should now run RMI file in Java.
Nadeem Ullah Profile
Nadeem Ullah answered
Follow the following steps for running an RMI program:    1. Compile the interfaces and classes of server and client programs.    2. Generate stubs and skeletons for remote program e.g server (if your communication is one way i.e. From client to server) by the following command:  >rmic    3. Run RMI registry by command:  >start rmiregistry    4. Run your server program by command:  >start java      5. Start your client program that will call your required methods on server program.
thanked the writer.
Anonymous commented
Yeah this is we need 2 do other things as well writing the client.policy code...................etc..................can u plz elaborate

Answer Question