【发布时间】:2013-10-23 17:16:05
【问题描述】:
所以我刚刚开始使用 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 找不到类(?)。 我已经看遍了,我似乎无法理解,如何将我的类文件添加到正确的位置?
【问题讨论】:
标签: java jakarta-ee rmi