【发布时间】:2017-04-07 09:23:44
【问题描述】:
程序执行后抛出如下异常。
未解决的编译问题:方法bind(String, Remote) in Registry 类型不适用于参数(字符串, EmployeeRMIMain)
public static void main(String args[]){
try {
EmployeeRMIMain obj = new EmployeeRMIMain();
Registry r = LocateRegistry.createRegistry(1234);
r.bind("Remote", obj);
} catch (RemoteException e) {
e.printStackTrace();
} catch (AlreadyBoundException e) {
e.printStackTrace();
}
}
【问题讨论】:
-
我发现了问题。
-
没有。以下错误消息是打印的,这是而不是程序的执行。
-
不要编辑您的问题以删除您所询问的问题。使其对其他读者毫无用处:也自相矛盾,因为更正的代码不可能导致显示的错误消息。或者删除你的问题。