Java Program -
RemoteInterface.java -
package com.gpm.ex3;
import java.rmi.RemoteException;
import java.rmi.Remote;
public interface RemoteInterface extends Remote {
public void SayHello() throws RemoteException;
}
Servant.java -
package com.gpm.ex3;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class Servant extends UnicastRemoteObject implements RemoteInterface {
public Servant() throws RemoteException
{
super();
}
public void SayHello() throws RemoteException
{
System.out.println("Hello Server");
}
}
import java.rmi.RemoteException;
import java.rmi.registry.Registry;
import java.rmi.registry.LocateRegistry;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.RemoteException;
0 Comments