急 java.rmi.registry.LocateRegistry;怎么了?

lionfx 2002-09-10 11:50:39
Registry reg = null;
reg = LocateRegistry.createRegistry(port);

错误提示:D:\java\rmi\Flip.java:33: unreported exception java.rmi.RemoteException; must be caught or declared to be thrown
reg = LocateRegistry.createRegistry(port);

怎么会事啊?

...全文
35 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
mem_fox 2002-09-10
  • 打赏
  • 举报
回复
try
{ reg = LocateRegistry.createRegistry(port); }
catch(RemoteException e)
{}
pentax 2002-09-10
  • 打赏
  • 举报
回复
加try{
reg = LocateRegistry.createRegistry(port);
}catch(RemoteException ee){}
这是很简单的一个错误啊,怎么也要来问?

62,612

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧