File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes SecurityException when loading dll from applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "SecurityException when loading dll from applet" Watch "SecurityException when loading dll from applet" New topic

SecurityException when loading dll from applet

Tan Gu

Joined: Apr 30, 2007
Posts: 1
We need to call dll from our applet. By adding entries into <usr.home>/.java.policy as below, i.e. grant to ALL applet, it works fine.

#beginning of policy file
grant {

However when associating it with the signedby as below, we encountered an exception (as at end of the post):

#beginning of policy file
grant signedBy "Edward" {

The applet is signed by self-generated certificate (as instructed at We have checked in Java Console that the certificate is already registered as trusted cert.

Is there any missing steps we need to do? Do we have to specify the keystore in the policy file?

Thanks for any response.

=============The exception says: ============== access denied (java.lang.RuntimePermission loadLibrary.rtftp)
at Source)
at Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkLink(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at RTFTP.<clinit>(

[ UD: fixed URL ]
[ April 30, 2007: Message edited by: Ulf Dittmer ]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, are you certain that the JVM agrees that this particular certificates is signed by "Edward"? Have you tried it with a standalone application instead of an applet? Policy issues are easier to debug that way.
I agree. Here's the link:
subject: SecurityException when loading dll from applet
It's not a secret anymore!