My signed applet throws AccessControlException

Dear java experts,

I am trying to hack some of my own code into a file upload applet I got off Sourceforge. I know two things so far... my code works when it's in my separate test applet and the ZUpload applet works before I modify it.

I have put my code into ZUpload and it compiles ok. I have packed it all up into a new jar and signed it.

The new jar contains:

/MyModifiedZUpload.class

/MyNewAdditional.class

/ [the various packages needed by ZUpload]

When I try and use the new jar I get the dreaded:

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

I have been searching for info about this error but it seems it's usually due to unsigned applets... but I've signed mine into a new jar so it can't be that...? If anyone can point me in the right direction it's much appreciated. Yes, I am a humble newbie.

In case it's significant, my new code reads in a text file via a URLConnection.

Also, kind of related... is there any way to test the applet while developing without having to keep jarring up the files and signing them...? seems hugely tedious and cumbersome!

cheers...

[1213 byte] By [blueskiwia] at [2007-11-26 17:47:11]
# 1

Hi!

I have a similar problem with my signed applet. My applet accesses classes/methods in another jar file ("jpos191.jar" - JavaPOS). When I try to call the open() method of a JavaPOS control class, I get an AccessControlException. I tried editing the the jpos191 source code so that I can trace where the exception is generated. I found that the exception is thrown by the method System.getProperties(), which is called in method isPropertyDefined() of jpos.util.DefaultProperties. It causes a PropertyPermission exception. To get rid of this, edited the java policy file and granted permission to all to be able to read/write properties (which is dangerous).

Anyway, my point is, why am getting the AccessControlException when my applet is already signed? Does it mean that I have to have jpos191.jar signed, too? It (jpos191.jar) is supposed to be a third party module. Is there any other way I can get rid of the exception w/out having to change the policy settings?

Hope you guyz here can help me.

Thanks in advance.

rainaia at 2007-7-9 4:59:28 > top of Java-index,Security,Signed Applets...
# 2
I have seen your message and I thought u can help me on my problem of signing applet..please can u tell me how to sign Applet and what will be the procedure ..please help..
daymakishora at 2007-7-9 4:59:28 > top of Java-index,Security,Signed Applets...
# 3
Hi!You can find the steps to signing a JAR file (as well as getting certificates) here: http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/rsa_signing.html
rainaia at 2007-7-9 4:59:28 > top of Java-index,Security,Signed Applets...