public interface RMIInterface extends Remote {
public byte[] geScreen() throws RemoteException;
public byte[] getProcessList() throws RemoteException;
public boolean execute(String command) throws RemoteException;
public boolean messageTo(String msg,String user) throws RemoteException;
public boolean saveImage(byte[] image,String user) throws RemoteException;
public byte[][] getimages(String user,String date)throws RemoteException;
}
上面的RMI接口方法抛出RemoteException,如果我把这些方法放在try里面,捕获RemoteException是否可以。