Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

java.security file policy setting not working...

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ive got a directory (namely C:\Documents and Settings\David\My Documents\Java\)
I want to grant all security permissions to.
So I made a policy file with the policy tool.
this is what the file contains:

grant codeBase "file:/C:/Documents and Settings/David/My Documents/Java/*" {
permission java.security.AllPermission;
};

this policy file is stored here:
C:\myJavaPolicy\myPolicy.policy

I want to add this to my java.security file...
so I added my file name to it, here is a snippet containing the information...

single system-wide policy file,
# and a policy file in the user's home directory.
policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:/C:/myJavaPolicy/myPolicy.policy

# whether or not we expand properties in the policy file
# if this is set to false, properties (${...}) will not be expanded in policy
# files.
policy.

the line of code I added was the one starting at "policy.url.2=file:"
however, when I tried my applets, they still seem to have no security permissions for accessing files etc.
the applets im trying to run are contained within a sub-directory of My Documents\Java\

What am I doing wrong? There must be something I'm overlooking...
I hope someone can help.

cheers
[ March 10, 2005: Message edited by: David Llewellyn ]
 
David Llewellyn
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone have any idea what I'm doing wrong?
I still can't figure it out...
 
I child proofed my house but they still get in. Distract them with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic