Current Position:Home > How to handle the java.policy file ?

How to handle the java.policy file ?

Update:10-11Source: network consolidation
Can somebody tell me how to handle the java.policy file?
I always get and while connecting to an appserver from an applet.
What do I have to write in the java.policy file, where do I have to place it and do I have to call it in some way form my applet?
Thanks in advance.
don call

The Best Answer

The java.policy file goes in your jre installation directory in .../jre/lib/security (there should be one there already).
I used it to allow otherwise restricted permissions for an applet using javax.comm. Add something like the following to the file:
grant codeBase "URL:http://yourDomainName/rootDirectoryOfYourApp/*" {
This will give the applet downloaded from your site all permissions. You might want to give only certain permissions, I don't know.
  • How to handle the java.policy file ? Update:10-11

    Can somebody tell me how to handle the java.policy file? I always get and while connecting to an appserver from an applet. What do I have to write in the java.policy file, where do I hav

  • File Access with unsigned Applet through editing the java.policy file Update:10-11

    I'am starting to lose my hair on this... I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of th

  • Can distribution of a .java.policy file be eliminated Update:11-30

    Sorry for the stupid question, but I'm fairly new to the realm of dealing with Java security... I have an applet that I want to deploy worldwide as part of an upgrade to an existing website, but I've run into the following error: "Error getting conne

  • Essential question concerning java.policy file Update:11-30

    I have been searching this forum for an answer to this question: Is there a way to run a signed applet on an intranet (via the Plugin) with out having to go around to each user's workstation and change their java.policy file? So far, I have seen this

  • .java.policy file problem Update:11-30

    Is there someone who knows how to reinitialise the java policy file at runtime? My signed applet writes a policy file to the users home directory, but that file is only used after closing the browser and surfing back to our page. It should immediatly

  • ".java.policy" file where is this located Update:11-30

    Hi, Where is the .java.policy file located. Do I have to create it? Do I have to use any editor for this? Please help me. Thank you, Regards UmaIt'll probably be in the lib/security directory of your JRE. If you've got a JDK then it'll be something l

  • Java.policy file  - Must I change it? Update:11-30

    I just got a certificate from Verisign with which I signed my applet. It works fine and now I want to distribute it to a group of users. Back when I was developing the applet with a self-signed cert, I changed the java.policy file to allow the applet

  • Where to put java.policy file? Update:11-30

    Under which directory the "java.policy" file must be kept in?Hi! The policy file must be indicated in the command line or by system property, when you starts the service, like the following: = yourfile.policy. If you want

  • How to handle big java source files in JDEV 10.1.3 Update:10-11

    Hi, I have some .java files that are like over 10,000 lines long. I know this is crazy but I didn't write it but I have to maintain it. I really dont feel like refactoring all these big source files right now. JDeveloper has lots of while-editing fea

  • Java Networking and policy file Update:11-30

    Two part question, First I writing a applet that is working with sockets, I've compared this and a delphi program and it seems that the delphi program is writing to and recieving from the socket at a faster rate (four second delay for the applet) the