简体   繁体   中英

Can a Java Applet Access Local File System

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

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

是的,如果小程序是用jarsigner工具签名的。

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.

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