0
當我啓動的RMIServer實現類它顯示此錯誤消息RMI拋出java.lang.ClassNotFoundException:RMIServerImpl_Stub
Remote exception: java.rmi.ServerException: RemoteException occurred in server t
hread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: RMIServerImpl_Stub
命令跑
開始rmiregistry中
開始的java -Djava.security.policy = policyfile RMIServerImpl
我該怎麼做才能解決這個問題。請幫助
這是我的RMI服務器的代碼
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.*;
公共類的RMIServerImpl擴展了UnicastRemoteObject 實現的RMIServer {
RMIServerImpl() throws RemoteException {
super();
}
public static void main(String args[]) {
try {
System.setSecurityManager(new RMISecurityManager());
RMIServerImpl Server = new RMIServerImpl();
Naming.rebind("SAMPLE-SERVER", Server);
System.out.println("Server waiting.....");
} catch (java.net.MalformedURLException mue) {
System.out.println("Malformed URL: " + mue.toString());
} catch (RemoteException re) {
System.out.println("Remote exception: " + re.toString());
}
}
}
我跑這個存根類是存在的。在我的java代碼中沒有包語句。我能做什麼 ? – user602774 2011-02-15 03:28:43