Exception Class | java.lang.SecurityException |
Message | J/Direct method has not been authorized for use on behalf of an untrusted caller. |
Possible Causes | An untrusted class has invoked a trusted method that attempts to make a J/Direct call. Even if the class making the actual J/Direct call is trusted, the security manager will throw a SecurityException if any of the methods in the call stack belong to an untrusted class. |
Possible Solutions | Digitally sign your applet requesting full permissions. Or, you can disable the security check by marking the class that attempts the J/Direct call with the @security directive, as shown in the following example:
Note Disabling this security check transfers responsibility for security from the Microsoft VM for Java to you. Remember that even with this security check disabled, you will still have to digitally sign the class for maximum trust. If you use the @security directive, you should ensure that the following statements are true:
|