Re: [問題]請問applet 開socket 連Java 寫的server程式

看板java作者時間19年前 (2006/07/28 07:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《welon.bbs@ptt.cc (小龍)》之銘言: > 如題 我開一個IE內崁Applet的程式 > Applet是Client端開socket 連Server端的程式 > 可是Clinet端好像開不出Socket 應該是權限的問題 > throw出以下的情況... > access denied (java.net.SocketPermission 140.xxx.xxx.xxx:9999 connect,resolve) > 這樣的情況 > 煩請大家回答... http://java.sun.com/sfaq/#socket 8. How can an applet open a network connection to a computer on the internet? Applets are not allowed to open network connections to any computer, except for the host that provided the .class files. This is either the host where the html page came from, or the host specified in the codebase parameter in the applet tag, with codebase taking precendence. For example, if you try to do this from an applet that did not originate from the machine foo.com, it will fail with a security exception: Socket s = new Socket("foo.com", 25, true); -- ▁▁──────────────────────╮ 江資地上站 ▁▁ Author: flame bbs.cs.tku.edu.tw From: 210-58-48-57.cm.dynamic.apol.com.tw
文章代碼(AID): #14oKpo00 (java)
文章代碼(AID): #14oKpo00 (java)