• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applet Signing problem

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic