在两台linux下架设rmi经常会出现以下异常,Naming.lookup(url)中url的ip地址明明是server端的ip,可返回的信息却是被本机的ip拒绝,确实很怪异,异常如下:
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused
解决方法是在server端的代码中添加一行代码:
System.setProperty("java.rmi.server.hostname",server端的ip);//添加这行代码
LocateRegistry.createRegistry(1099);
RemoteImpl service = new RemoteImpl();
Naming.rebind("RmiServer", service);

unix系统下FTP上传文
另人惊讶!诺基亚手机
图解FTP服务器SERV-U
[图文]Linux系统中调
Linux环境下的Java开
使用pcAnywhere 11.5
Ubuntu下安装Wordpres
Linux下免用户名密码