Can a Java Applet Access Local File System

﹥>﹥吖頭↗ 提交于 2021-01-29 10:40:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!