File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes SecurityException when using applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "SecurityException when using applets" Watch "SecurityException when using applets" New topic
Author

SecurityException when using applets

Payam Fard
Ranch Hand

Joined: Jan 31, 2003
Posts: 73
Hi Everyone,

I am new to applets, and my manifest file is:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.3
Permissions: all-permissions
Created-By: 1.6.0-internal (Sun Microsystems Inc.)

Name: com/myPackage/test/client/TaskApplet.class
SHA1-Digest: pLmraui35IkgfAq+v3WGj1LwCYQ=

The error I get is as follows:

When the page is loaded I get the following error:
java.lang.SecurityException: class "com.myPackage.test.client.TaskApplet" does not match trust level of other classes in the same package

Would you please advise what I need to do to fix the above security exception?

Thanks,
Payam
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

The following two SecurityExceptions are thrown after mixed components had previously been detected and a decision was made to allow them to coexist. The exceptions indicate that a component name collision (resource name or class package name) was detected between trusted and untrusted components and the request to load the resource or class was denied.
"resource \"" + name + "\" does not match trust level of other resources of the same name"
"class \"" + packageName + "\" does not match trust level of other classes in the same package"

More on it here http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/mixed_code.html


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SecurityException when using applets