以下方法:
private void startServer() { // snippet that starts the server on the local machine
try {
RemoteMethodImpl impl = new RemoteMethodImpl();
Naming.rebind( "Illusive-Server" , impl );
}catch(Exception exc) {
JOptionPane.showMessageDialog(this, "Problem starting the server", "Error", JOptionPane.ERROR_MESSAGE);
System.out.println(exc);
}
}
抛出此异常:java.rmi.ServerException:服务器线程中发生RemoteException;嵌套异常是:
java.rmi.UnmarshalException:错误解组参数;嵌套异常是:
java.lang.ClassNotFoundException:Interfaces.RemoteMethodIntf
当我启动我的项目时,我会收到JOptionPane中的消息,说服务器启动服务器然后出现上述异常.这可能是什么原因?
我不明白为什么最后一个异常声明说当我导入了正确的包时,没有找到类