import java.rmi.*; public class MyLocal { public static void main(String args[]) { try { MyRemote ServerObject = (MyRemote) Naming.lookup("//localhost/SampleServerObject1"); System.out.println("Here is the answer: " + ServerObject.add_one(5)); } catch (Exception e) { } } }