锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲av永久中文无码精品综合,亚洲黄网站wwwwww,亚洲AⅤ无码一区二区三区在线http://www.tkk7.com/feuyeux/category/48716.htmlBelong to Eric Hanzh-cnWed, 25 Apr 2012 20:52:02 GMTWed, 25 Apr 2012 20:52:02 GMT60Java榪滅▼鏂規(guī)硶璋冪敤瀹炶返 http://www.tkk7.com/feuyeux/archive/2011/05/26/RMI.htmlLu HanLu HanThu, 26 May 2011 15:55:00 GMThttp://www.tkk7.com/feuyeux/archive/2011/05/26/RMI.htmlhttp://www.tkk7.com/feuyeux/comments/351136.htmlhttp://www.tkk7.com/feuyeux/archive/2011/05/26/RMI.html#Feedback1http://www.tkk7.com/feuyeux/comments/commentRss/351136.htmlhttp://www.tkk7.com/feuyeux/services/trackbacks/351136.html鏈嶅姟鍣ㄧ涓氬姟鎺ュ彛緇ф壙鑷猂emote
public interface Biz extends Remote {
public String aloha() throws RemoteException;
}

鏈嶅姟鍣ㄧ涓氬姟瀹炵幇璇ユ帴鍙?/div>
public class BizImpl extends UnicastRemoteObject implements Biz {
private static final long serialVersionUID = -8559392326593037120L;
public BizImpl() throws RemoteException {
super();
}
@Override
public String aloha() throws RemoteException {
return "Aloha Baby.";
}
}

鏈嶅姟鍣ㄦ敞鍐岃繙紼嬪疄鐜板悕縐?br />
public class Server {
public Server() {
try {
Biz bis = new BizImpl();
// style-1
Registry registry = LocateRegistry.createRegistry(RMIParameter.PORT);
registry.rebind(RMIParameter.NAME, bis); // replace existing binding name
// style-2
//java.rmi.Naming.rebind(RMIParameter.NAME, bis); // replace existing binding name
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String args[]) {
new Server();
}
}

style-2 闇瑕佹寚瀹氫竴涓狿olicy鏂囦歡鎴栬呰繍琛宺miregistry
java -Djava.security.policy=folder_x/rmi/policy_file creative.fire.rmi.Server
Policy鏂囦歡鐨勫唴瀹逛負(fù)錛?/div>
grant{
      permission java.net.SocketPermission "localhost:9527", "connect, resolve";
};
榪愯rmiregistry鏄慨鏀?JDK 鐩綍涓嬬殑jre/lib/security/java.policy
rmiregistry錛坙inux錛?/div>
start rmiregistry(windows)
鍏佽浠諱綍浜?targets)浣滀換浣曚簨鎯?actions)錛?/div>
grant{
        permission java.security.AllPermission "","";
};
OR
grant {
  permission java.security.AllPermission;
};
瀹㈡埛绔墦妗╄皟鐢?br />
public class Client {
public static void main(String args[]) {
try {
Biz bis = (Biz) Naming.lookup(RMIPREFIX + PORT + NAME);
System.out.println(bis.aloha());
} catch (Exception e) {
e.printStackTrace();
}
}
}


Lu Han 2011-05-26 23:55 鍙戣〃璇勮
]]> 主站蜘蛛池模板: 美女尿口扒开图片免费| 99国产精品免费视频观看| 国产亚洲av片在线观看16女人 | 国产亚洲一卡2卡3卡4卡新区| 亚洲国产成人VA在线观看| 日本一区二区免费看| 在线综合亚洲欧洲综合网站| 亚洲无码精品浪潮| 91精品手机国产免费| 国产成人综合亚洲| 亚洲黄色在线观看视频| 又粗又硬又黄又爽的免费视频| 一区二区免费视频| 亚洲AV成人精品一区二区三区| 久久精品亚洲日本佐佐木明希| 在线播放免费播放av片| 免费福利在线视频| 国产精品亚洲va在线观看| 亚洲电影唐人社一区二区| 国产精品亚洲精品日韩已方| 亚洲高清中文字幕免费| 中文字幕a∨在线乱码免费看 | 免费精品国产自产拍在线观看 | 亚洲AV无码乱码在线观看性色扶 | A级毛片内射免费视频| 两性色午夜视频免费网| 亚洲欧洲日产国码久在线| 亚洲男人第一av网站| 亚洲中文无韩国r级电影| 宅男666在线永久免费观看| 97免费人妻在线视频| baoyu116.永久免费视频| 美女视频黄视大全视频免费的| 亚洲六月丁香六月婷婷色伊人| 久久91亚洲人成电影网站| 亚洲av无码乱码在线观看野外| 日本免费的一级v一片| 国产成人精品免费视频网页大全| 成人久久免费网站| www在线观看免费视频| 国产成人综合久久精品亚洲|