I got " java.lang.IllegalAccessException" when I use reflection API to access a private field. I have checked my policy file and it should be granted the permission needed. I am not sure what else have to be changed to allow the reflection API to access private members.
Here is my code:
And these 2 lines are included in my policy files "C:\Program Files\Java\jre6\lib\security\java.policy" and "C:\Program Files\Java\jdk1.6.0_17\jre\lib\security\java.policy"
Are these 2 lines enough to allow my reflection API to access private fields?