开发者

Java applet doesn't run on my local machine

开发者 https://www.devze.com 2022-12-16 09:51 出处:网络
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.

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 d开发者_Go百科irectory.

Need help.


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.


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号