【发布时间】:2014-05-17 06:42:32
【问题描述】:
我很法语,很抱歉我的英语。
我正在尝试启动服务器 rmi,但应用程序停止但出现错误:
这是我的代码:
公共类服务器{
public static void main(String[] args) {
try {
RemoteFunction skeleton = (RemoteFunction) UnicastRemoteObject.exportObject(new FunctionImpl(), 0);
int port = Integer.parseInt(Jndiprop.getString("port"));
Registry registry = LocateRegistry.createRegistry(port);
registry.rebind(Jndiprop.getString("url"), skeleton);
System.out.println("Rmi start");
} catch (Exception e) {
e.printStackTrace();
}
}
}
端口和url都可以。
有人可以帮助我吗?
【问题讨论】: