aspose file tools*
The moose likes Applets and the fly likes Applet Signing problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet Signing problem" Watch "Applet Signing problem" New topic
Author

Applet Signing problem

Swathi Prakash
Ranch Hand

Joined: Jan 18, 2005
Posts: 49
Hai ,,

i tried to read the file using url method in applet..
i signed Applet using these

jar cvf test.jar samp.class
jarsigner -keystore mykeystore test.jar signtest

before these i created the keystore using these

keytool -genkey -keystore mykeystore -keyalg RSA -alias signtest

keytool -selfcert -alias signtest -keystore mykeystore


i m getting the error like these

access denied (java.util.PropertyPermission * read,write)

plz help me.
Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
I had this problem recently. If you're using a JDK 1.4 or up, signed applets will have problems reading files from hard disks UNLESS you make changes to the local policy file settings. Check in your %JDK_HOME%/jre/lib/security/java.policy file. If you add a line similar to



It should give you rights to read/write to that file. You can also add permissions to do things like read a user's home directory from the system, etc.

The problem I ran into after figuring this out was how to make sure that each user's java.policy file had these changes. I believe there's a programmatic way to set these policy rights that you might look into as well.
Swathi Prakash
Ranch Hand

Joined: Jan 18, 2005
Posts: 49
thanks for u r help tom. till i m getting the same error.plz help me.

is it is required my file should be in same directory.


plz help me. i m going to read the file "name.css".which is in some other directory.

i gave like this. till i m geting the same error. plz help me..

permission java.util.PropertyPermission "name.css","read,write";

Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
Sorry, I have not had enough coffee yet- you need to put the full path of your file in the java.policy file, or it WILL be looking in the same directory.

Post more details about the error you're getting, what you're trying to do, etc.
Swathi Prakash
Ranch Hand

Joined: Jan 18, 2005
Posts: 49
I properly signed my applet to read and write a file . it is working perfectly in Appletviewer.but in IE it is not worknig. in that java console it is showing the error like below..


access denied (java.util.PropertyPermission * read,write)


i dont know what is the problem is ..plz help me.


Thanks in advance....

Swathi
 
jQuery in Action, 2nd edition
 
subject: Applet Signing problem