java.security.AccessControlException: access denied (java.util.PropertyPermission MaxPoints read)

Hello,
what does it mean this exception
java.security.AccessControlException: access denied (java.util.PropertyPermission MaxPoints read)
I got it in my applet.
Thank you
nphnhiAsked:
Who is Participating?
 
objectsCommented:
you're trying to read a property without permission.
0
 
Mig-OCommented:
You did something an applet is not allowed to.
0
 
Mig-OCommented:
To solve this, you have to change the applet access previlegues at the client. There is a file called java.policy at the client, where you can add rights that get granted to clients. Standalone Java Applications by default have all rights, while applets (for good reason) don't.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
TimYatesCommented:
>>  To solve this, you have to change the applet access previlegues at the client.
>> There is a file called java.policy at the client, where you can add rights that get granted to clients.

Of course, this is a bit of a hack, and you would have to do it on every client machine that wants to use your applet...

Most users will refuse to do this (I know I would)

What you need to do is try to find another way of setting "MaxPoints" other than in a properties file

Or sign your applet so it can read properties...

I'd go for the first option...

The applet can read stuff from the server it was loaded from, so maybe store these values on the website and have the applet read, then parse them via a HttpURLConnection?

Tim
0
 
aozarovCommented:
Agree, with TimYates just add to his list of solutions the ability of an Applet to read parametrs from its Applet tag.
see: http://java.sun.com/j2se/1.4.2/docs/api/java/applet/Applet.html#getParameter(java.lang.String)

From the javadoc:
 <applet code="Clock" width=50 height=50>
 <param name=Color value="blue">
 </applet>
 
a call to getParameter("Color") returns the value "blue".
0
 
TimYatesCommented:
good point :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.