Tuesday, July 24, 2007

How to start RMIRegistry programmatically

I often face with the necessity of programmatical RMI registry starting. So, this is a solving:

try {
    java.rmi.registry.LocateRegistry.createRegistry(1099);
    System.out.println("RMI registry ready.");
} catch (Exception e) {
    System.out.println("Exception starting RMI registry:");
    e.printStackTrace();
}

3 comments:

Akinwale Ifaniyi said...
This comment has been removed by the author.
Akinwale Ifaniyi said...

Glad I found this when I did... Saved me hours of debugging. Thanks.

for IT the said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training in India . Nowadays Java has tons of job opportunities on various vertical industry.