Samples JDK
AdditionClient.java
1 package com.freemindcafe.rmi.sample2.client;
2 
3 import java.rmi.Naming;
4 
6 
7 
8 
9 public class AdditionClient {
10 
11  public static void main(String[] args) throws Exception {
12  IAddition hello;
13  hello = (IAddition)Naming.lookup("rmi://localhost/rmi-sample2");
14  int result=hello.add(9,10);
15  System.out.println("Result is :"+result);
16  }
17 
18 }
rmic and rmiregistry is used. This one uses SecurityManager. But SecurityManager is not a must...