• 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

does anyone use the .java.policy file?

 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Am I the only one using .java.policy file to allow an applet to read files on my local disks? I'm able to have an applet in Firefox read/write a file, but in IE7 it fails.

Any recommendations on how to debug/trace it so I can get it to work?

Thanks,
Norm
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The first step would be to make sure that the policy file that contains your modifications is being used at all. Maybe create a new Permission class, require that in the applet, but don't add it to the file. Then the applet should fail.

Or comment out some of the permissions that were in the file before, and make sure that the applet fails where those are required.

Once you know the file is being used you can work on the individual permission you actually want to add. I seem to recall seeing a discussion recently that implied different browsers didn't recognize quite the same policy file syntax (which doesn't make much sense, as it's the JVM doing the interpreting, but it was being claimed).
 
Norm Radder
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the response.
I've asked questions on this problem from several points of view. You probably saw some of them.
The .java.policy file has been working for years with some browsers. It works for IE7 if the file to be writtten is fully referenced, but not with the - or * wildcard.
It seems that IE7 must have a different Security Manager.

The only techniques I've seen are what I call the shotgun method, try every possible combination until you find the one that works. No way to trace the Security manager to see what it needs or what it doesn't like.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic