You are on page 1of 1

import java.rmi.

*;
import java.rmi.server.*;
public class hello extends UnicastRemoteObject implements hellointerface
{
private String message;
public hello() throws RemoteException
{
}
public String say(String msg)throws RemoteException
{
message=msg;
return message+"Hai";
}
public static void main(String agrs[])
{
try
{
hello obj=new hello();
Naming.rebind("raj1server", obj);
System.out.println("Hello Registered");
}
catch(Exception e1)
{
e1.printStackTrace();
}
}
}

You might also like