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