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

How to handle the java.policy file ?

Update:10-11Source: network consolidation
Advertisement
Can somebody tell me how to handle the java.policy file?
I always get java.net.SocketExceptions and java.security.AccessControlExceptions 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

Advertisement
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/*" {
     permission java.security.AllPermission;
This will give the applet downloaded from your site all permissions. You might want to give only certain permissions, I don't know.
Teri
  • How to handle the java.policy file ? Update:10-11

    Can somebody tell me how to handle the java.policy file? I always get java.net.SocketExceptions and java.security.AccessControlExceptions 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

  • 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