Saturday, March 13, 2010

More on RMI

I am writing this post the usage of IntelliJ IDEA users, who need to run RMI application using the IDE.
For the IntelliJ IDEA user-
First go to the settings-> compiler -> rmi compiler -> enable it

Then you have to set the VM parameters (run config) for the class that

need to compile and run as a RMI application. Following is how to do it.

c: - indicate the disk drive where your project located
out - indicate the out folder of your project

Folliwing code description shows how to run RMI registry from the source code. Before all the RMI logic start initialize this code and you will not need to run the rmi registry manually in your computer.

Process rmi = null;
rmi = Runtime.getRuntime().exec("rmiregistry");
catch (IOException ex){
//exception handling logic here
catch (InterruptedException exc){
//exception handling logic here

No comments:

Post a Comment