applet give me error (java.security.AccessControlException: access denied (java.util.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: applet give me error (java.security.AccessControlException: access denied (java.util.

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Posts
    7

    applet give me error (java.security.AccessControlException: access denied (java.util.

    --------------------------------------------------------------------------------

    hi master
    sir my applet give me this error

    java.security.AccessControlException: access denied (java.util.PropertyPermission oracle.jserver.version read)

    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
    at java.security.AccessController.checkPermission(AccessController.java:401)

    sir i search in net i got some idea

    i. change java.policy
    and put this code

    grant codeBase "http://ib-s01/-" {
    permission java.security.AllPermission;
    };



    sir search in my system

    C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\lib\security
    C:\Program Files\j2sdk_nb\_jvm\lib\security
    C:\Program Files\Java\j2re1.4.1_03\lib\security
    C:\Program Files\Java\jre1.5.0_10\lib\security

    sir i have many java.policy file which one is default java.policy file

    how i add the code

    permission java.util.PropertyPermission "java.version", "read";
    permission java.util.PropertyPermission "java.vendor", "read";
    permission java.util.PropertyPermission "java.vendor.url", "read";
    permission java.util.PropertyPermission "java.class.version", "read";
    permission java.util.PropertyPermission "os.name", "read";
    permission java.util.PropertyPermission "os.version", "read";
    permission java.util.PropertyPermission "os.arch", "read";
    permission java.util.PropertyPermission "file.separator", "read";
    permission java.util.PropertyPermission "path.separator", "read";
    permission java.util.PropertyPermission "line.separator", "read";
    permission java.util.PropertyPermission "java.specification.version", "read";
    permission java.util.PropertyPermission "java.specification.vendor", "read";
    permission java.util.PropertyPermission "java.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.specification.version", "read";
    permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
    permission java.util.PropertyPermission "java.vm.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.version", "read";
    permission java.util.PropertyPermission "java.vm.vendor", "read";
    permission java.util.PropertyPermission "java.vm.name", "read";

    and this code


    grant codeBase "C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\lib\security
    " {
    permission java.security.AllPermission;
    };


    give me idea how i add my code in java.policy file of using the oracle database in applete

    thank

    aamir

  2. #2
    Join Date
    Mar 2004
    Posts
    78
    Hi,

    The best you can do is to edit the file <userHome>/.java.policy
    Here is the user level java policy access rights definition.
    If you start an application and specify in the startup file a policy file it will take precedence.
    In case you start your application within an application server - I think this is the case - the server itself being a java application has its own policy file - usually somewhere in <server_home>/config folder. There per server and per application permissions can be specified. Please also note that from an applet you can not read/write on the user machine - it is forbidden by definition.

    if you want to connect a DB server you have to connect to the application server used to show the applet and from there you can connect the DB server and show the data. On the remote side you can use an EJB or just a servlet.
    The reason is that the only thing an applet can open a vilad HTTP session to is the server that provided the applet. The reason is client side security.

    I hope that this info can help you solve this problem

    Bless ya!
    Last edited by NewUniverse; 01-11-2007 at 03:29 AM.

Similar Threads

  1. Replies: 4
    Last Post: 03-16-2006, 05:23 PM
  2. PerformanceCounter Access Denied Win2k
    By Eyebolt in forum .NET
    Replies: 0
    Last Post: 02-02-2006, 12:01 PM
  3. Self signed applet to access System resources.
    By navneet singh in forum Java
    Replies: 0
    Last Post: 06-14-2005, 07:10 AM
  4. WMI Access Denied
    By Garry Mc in forum .NET
    Replies: 1
    Last Post: 05-02-2003, 02:04 PM
  5. Replies: 1
    Last Post: 04-17-2001, 03:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center