import java.rmi.*; import java.rmi.server.*; public class MyRemoteImpl extends UnicastRemoteObject implements MyRemote { public MyRemoteImpl() throws RemoteException {} public int add_one(int x) { return(x+1); } public String stringify_an_int(int y) { return("Your number is " + y); } public static void main(String args[]) { try { MyRemoteImpl r = new MyRemoteImpl(); Naming.bind("//localhost/SampleServerObject1",r); } catch (Exception e) { System.err.println("Exception: " + e.getMessage()); } } }