简体   繁体   中英

Java applet doesn't run on my local machine

I'm writing my own Java applet that can write to /tmp on my local unix machine. this applet is only going to run on a html page, inside my machine only. No server involved.

But when I try to open my page inside Firefox, the applet doesn't seem to work at all. I don't understand why, since all the .class, .html and .jar files are on the same directory.

Need help.

I don't know very much about applets, but I remember that one basic constraint is that they can't access the local filesystem.

If you want to do that one good option is to use Javascript. EDIT : But it will not work directly!

A normal applet can't access the filesystem, as they are by default not trusted.
To enable filesystem access and other things (like native librarys) for an applet it has to be signed.
When a signed applet is loaded into the browser the first time, a notification pops up requesting the user to confirm that the applets signature is trusted. More information here .

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