• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 719
  • Last Modified:

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
0
nphnhi
Asked:
nphnhi
2 Solutions
 
Mig-OCommented:
You did something an applet is not allowed to.
0
 
objectsCommented:
you're trying to read a property without permission.
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now