简体   繁体   中英

Java applet open network sockets?

So i made this simple JApplet and tried to open a socket and write to it, but i got an exception saying i don't have permission???

So then i looked at this: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html

I've got the jar signed, and that's it. I don't get what to do after that????

And in the html file, what does

<param name=file value="/etc/inet/hosts">

do?

Are there any easier ways to sign japplets?

Let me ask this simply. How do i let my applet open a socket on lets say port 80 for google.com?

<param name=file value="/etc/inet/hosts">

This means that the name 'file' will have the value /etc/inet/hosts when queried by the applet. EG

// in the init() method ..
String fileValue = getParameter("file");
// fileValue now has the value '/etc/inet/hosts'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM