所以我刚开始使用 RMI,我为服务器端构建了这些类:
public interface ServiceServer extends Remote
public class ServiceServerImpl extends UnicastRemoteObject implements ServiceServer
public interface Service extends Serializable
而这个类的客户端:
public class ServiceBrowser
当我尝试运行我的程序时,我得到了这个异常:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: FirstTryRMI.ServiceServer
据我了解,问题在于 RMI 找不到类(?)。我已经看遍了,我似乎无法理解,如何将我的类文件添加到正确的位置?