问题
I am creating a java applet, that gets information out of a JAR file on my local file system, and creates a jpanel to display in the applet.
I am getting the applet to load correctly on the appletViewer in Eclipse, but it will not load whenever i launch the Html file i created.
The html file is points to the class files, also to the external jars.
Any Suggestions?
Thanks
回答1:
Yes, if the applet is signed with the jarsigner tool.
回答2:
Unless explicitly granted, an applet may not access the local file system.
"Will not load" sounds like you have a packaging error instead of a permission error. Have a look at the appletviewer logs.
回答3:
If you are using Netbeans then right click on your Applet project ->Properties->webstart-> clickon Enablewebstart ->customize->select radio self-signedby generatedkey->ok
then your job will be done
来源:https://stackoverflow.com/questions/9813191/can-a-java-applet-access-local-file-system