Please help me , I am having java.security.AccessControlException

Hi,
Let me tell you may problem,
I have an application with its jar file build inside for eg in E:\Projects folder with the name MyApplication,
also I have build this application and its jar file whose name is MyApplication.jar is inside dist folder.
Well I go inside this folder and type this command as I have shown below;
E:\Projects\MyApplication> java -jar "MyApplication.jar"
there is no error every thing works fine, but if I go to the root folder and
type the command as I have shown below;
E:\>java -jar "E:\Projects\MyApplication\dist\MyApplication.jar"
I get the following error, tell me whats wrong;
checkPermission Line no:-1 java.security.AccessController.checkPermission(Unknown Source)
java.security.AccessControlException: access denied (java.io.FilePermission jint
egra.log write)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkWrite(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.linar.jintegra.Log.logImmediately(Unknown Source)
at bis.opencontrol.opcconnector.CheckOPCServerOne.checkThisOPCServerAtTh
isIPaddress(CheckOPCServerOne.java:74)
at bis.opencontrol.opcconnector.CheckOPCServerOne.run(CheckOPCServerOne.
java:57)
at java.lang.Thread.run(Unknown Source)
at com.mysql.jdbc.Connection.<init>(Connection.java:716)
Feb 07,2009 8:12:51:212 PM|bis.opencontrol.opcconnector.CheckOPCServerOne.class(
120)|Thread-12| checkPermission Line no:-1 java.lang.SecurityManager.checkPermis
sion(Unknown Source)
java.security.AccessControlException: access denied (java.io.FilePermission jint
egra.log write)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkWrite(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.linar.jintegra.Log.logImmediately(Unknown Source)
at bis.opencontrol.opcconnector.CheckOPCServerOne.checkThisOPCServerAtTh
isIPaddress(CheckOPCServerOne.java:74)
Well please help me I don't know whats wrong...

Reset Security Questions
http://support.apple.com/kb/ht5312
If you still have problem, call Apple to help reset your Security Question.
http://support.apple.com/kb/HT5699

Similar Messages

  • HELP!!! java.security.AccessControlException: access denied

    Please help!
    I have the project to use the applet to show the form, this applet is needed to read the file from the server side. when i using the jbuilder to coding, it can work to use the appletviewer to run the program to read the file.
    After that i placed the code to the webapp (localhost), when i start up tomcat and use the ie to view the http://localhost:8080/auditForm/AuditForm.html. (this AuditForm.html is embedded the test.class. test.class use to read the file.
    but error was occurred.
    i am using the File Object to read file
    File propertyFile=new File("C:/Tomcat/webapps/XX/WEB-INF/dbconfig.properties");java.security.AccessControlException: access denied (java.io.FilePermission C:\Tomcat\webapps\auditform\test\dbconfig.properties read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkRead(Unknown Source)
         at java.io.File.canRead(Unknown Source)
         at DBconfig.<init>(DBconfig.java:31)
         at test.init(test.java:19)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    i am try to set the security policy in jdk, and tomcat, but also cannot work??? is it wrong setting??? how come.
    urgent!!!!

    Hey guys,
    You can access what ever file you want on the originating host i.e. the server.
    Im guessing you guys are testing your applet code probably before it takes the form of an applet. It's fundamental to realise that applets are downloaded to the client and excuted in a 'sandbox' by the java-plugin installed in the client browser. Hence using a File instance pointing somewhere on the C:\ drive is totally pointless as you likely won't have permission to access the client's hard drive anyway. More to the point, it is totally wrong; the property files or movies do not reside on the client machine.... and there is no need to confuse matters by talking about signing Jars.
    My advice is to read the Applet/JApplet APIs which cleary show how to access 'resources' on the server - no extra permissions are needed so it is not even a security issue. Also, you web application usually can not see outside its context/document base so you will need to put the property file or movies in the same directory (or a visible sub-directory) as the applet code/jar itself.
    Hope this info is of some use.
    Warm regards.

  • HT1476 My charging cables keep malfunctioning! Please help @ £15 a time having an iphone is getting exspensive

    My charging cables keep malfunctioning! Please help @ £15 a time having an iphone is getting exspensive

    If the cable that came with it went bad with in a year, it's still under warranty. Have it replaced.

  • Can anyone please help me, I'm having problems with sound while watching video clips using flash player using Internet Explorer\

    Can anyone please help me, I'm having problems with sound while watching video clips using flash player & Internet Explorer

    There's a good chance that this is a known issue.  We'll have a Flash Player 18 beta later this week that should resolve this at http://www.adobe.com/go/flashplayerbeta/

  • HT201363 please help me i cant rembar my security question

    please help me i cant rembar my security question
    send me on email:
    [email protected]

    Kappy's Some Solutions for Resetting Forgotten Security Questions
    (only solutions)

  • I reset my apple password but i cannot recieved email on recovery email either on same email which i submit for apple id somebody hacked my apple id please help and worst thing i remembered security quitions but i cant remembered date of birth please help

    i reset my apple password but i cannot recieved email on recovery email either on same email which i submit for apple id somebody hacked my apple id please help and worst thing i remembered security quitions but i cant remembered date of birth please help

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    Also
    If you have Find My iPhone enabled, you can use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.

  • Java.security.AccessControlException via appletviewer

    I am currently working through the downloadable examples from the
    JDBC APU Tutorial & Reference (2nd Ed.). I am having problems
    running the OutputApplet via the appletviewer. I use the
    connection string that works all the other examples however I get
    the error message:
    java.security.AccessControlException: access denied
    (java.net.SocketPermission *'..nodename..'* resolve) at
    java.security.AccessControlContext.checkPermission(AccessControlContext.java,
    Compiled Code) at
    java.security.AccessController.checkPermission(AccessController.java,
    Compiled Code) at
    java.lang.SecurityManager.checkPermission(SecurityManager.java,
    Compiled Code) at
    java.lang.SecurityManager.checkConnect(SecurityManager.java,
    Compiled Code)
    where the nodename is the oracle installation machine name. The
    connection string I use is :
    jdbc.oracle.thin:usrname/passwd@db_url:portNo:db_name
    I am using Java1.2 and Oracle 7 thin drivers. All the other
    examples have worked using this url string.
    Please help. . .
    null

    Try using 8.1.5 or 8.1.6 jdbc thin drivers because only these two thin drivers support jdk1.2.
    altrine.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Lucy Anderson ([email protected]):
    I am currently working through the downloadable examples from the
    JDBC APU Tutorial & Reference (2nd Ed.). I am having problems
    running the OutputApplet via the appletviewer. I use the
    connection string that works all the other examples however I get
    the error message:
    java.security.AccessControlException: access denied
    (java.net.SocketPermission *'..nodename..'* resolve) at
    java.security.AccessControlContext.checkPermission(AccessControlContext.java,
    Compiled Code) at
    java.security.AccessController.checkPermission(AccessController.java,
    Compiled Code) at
    java.lang.SecurityManager.checkPermission(SecurityManager.java,
    Compiled Code) at
    java.lang.SecurityManager.checkConnect(SecurityManager.java,
    Compiled Code)
    where the nodename is the oracle installation machine name. The
    connection string I use is :
    jdbc.oracle.thin:usrname/passwd@db_url:portNo:db_name
    I am using Java1.2 and Oracle 7 thin drivers. All the other
    examples have worked using this url string.
    Please help. . . <HR></BLOCKQUOTE>
    null

  • Java.security.AccessControlException: access denied (java.util.PropertyPerm

    Hi All,
    I try to run an applet from Solaris 8 server on some client machine using IE5 and NetScape 6.2 ( I installed JRE 1.4, I also try other JRE versions) but I get the following errors again and agian,
    I even try to use appletviewer on the Solaris Box itself to open the applet but it makes no difference same errors
    could somebody please help or give me a hint how should I start tracing what the problem might be ?
    this applet comes with Solaris Bandwidth Manager as a gui administration tool ( webbased ) it supposed to change the configurations remotly over the web. I asure there is no solaris permission problem exist.
    I use Tomcat on the server side.Installed JDK 1.3 on Solaris 8 with all the default settings.
    i suppose something should be done with java.policy or java.security files i know nothing about java security please at least give me some URL's to find out more about this matter i searched a lot but couldn't find good documents about java default security restrictions
    java.lang.ExceptionInInitializerError
    at com.sun.ba.common.QConfiguration.loadPredefServices(QConfiguration.java:617)
    at com.sun.ba.common.QConfiguration.getPredefServices(QConfiguration.java:630)
    at com.sun.ba.tool.MainPanel.<init>(MainPanel.java:95)
    at com.sun.ba.tool.QoSFrame.<init>(QoSFrame.java:48)
    at com.sun.ba.tool.baApplet.init(baApplet.java:46)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission console read)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
    at java.lang.System.getProperty(Unknown Source)
    at com.sun.ba.common.QDebug.<clinit>(QDebug.java:39)
    ... 7 more
    any help would be appriciated so much.
    thanks
    mehmad

    I dont know, but It may be that an Applet can only access the local machine. ie. If you run the applet on computer A and you want to edit the config on computer B, I do not believe you can. The applet can only talk to Computer A. You would have to:
    1) Run an application on computer A and the applet would tell the application what to change.
    2)Maybe sign the applet in a JAR File
    You will probably have to do #1.
    US101

  • Java.security.AccessControlException: access denied (java.util.PropertyPer

    Hi All,
    I try to run an applet from Solaris 8 server on some client machine using IE5 and NetScape 6.2 ( I installed JRE 1.4, I also try other JRE versions) but I get the following errors again and agian,
    I even try to use appletviewer on the Solaris Box itself to open the applet but it makes no difference same errors
    could somebody please help or give me a hint how should I start tracing what the problem might be ?
    this applet comes with Solaris Bandwidth Manager as a gui administration tool ( webbased ) it supposed to change the configurations remotly over the web. I asure there is no solaris permission problem exist.
    I use Tomcat on the server side.Installed JDK 1.3 on Solaris 8 with all the default settings.
    i suppose something should be done with java.policy or java.security files i know nothing about java security please at least give me some URL's to find out more about this matter i searched a lot but couldn't find good documents about java default security restrictions
    java.lang.ExceptionInInitializerError
         at com.sun.ba.common.QConfiguration.loadPredefServices(QConfiguration.java:617)
         at com.sun.ba.common.QConfiguration.getPredefServices(QConfiguration.java:630)
         at com.sun.ba.tool.MainPanel.<init>(MainPanel.java:95)
         at com.sun.ba.tool.QoSFrame.<init>(QoSFrame.java:48)
         at com.sun.ba.tool.baApplet.init(baApplet.java:46)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission console read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at com.sun.ba.common.QDebug.<clinit>(QDebug.java:39)
         ... 7 more
    any help would be appriciated so much.
    thanks
    mehmad

    Hi,
    Please make changes in the java.security files present in the jdk1.3/lib/jre/security/java.security.There you make the changes in the property which gives you the error.See if this helps..
    regards vickyk

  • Socket programming + java.security.AccessControlException: access denied

    the code below is for a particular port and IP ..what is the command for granting permission for all the sites?
    please help, i have been unable to tackle this problem from the past 24 hours.
    iam getting an error too..
    java.security.AccessControlException: access denied (java.net.SocketPermission yahoo.com resolve)
    grant {
      permission java.net.SocketPermission
            "puffin.eng.sun.com:7777",
         "connect, accept";

    ..

  • Java.security.AccessControlException: access denied

    Hi all
    While deploying my portal application lots of following exceptions are thrown. Please guide me how I can solve this issue
    <Aug 16, 2007 12:27:43 PM PKT> <Warning> <Management> <BEA-400409> <Exception fr
    om ApplicationFilePoller while checking for changes in application appsdirDteP
    ortal_dir, directory GHQPortal.
    java.security.AccessControlException: access denied (java.io.FilePermission D:\b
    ea\user_projects\domains\portalDomain\applications\DtePortal\GHQPortal read)
    at java.security.AccessControlContext.checkPermission(Ljava.security.Per
    mission;)V(AccessControlContext.java:269)
    at java.security.AccessController.checkPermission(Ljava.security.Permiss
    ion;)V(AccessController.java:401)
    at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)
    V(Unknown Source)
    at java.lang.SecurityManager.checkRead(Ljava.lang.String;)V(Unknown Sour
    ce)
    at java.io.File.list()[Ljava.lang.String;(Unknown Source)
            at java.io.File.list(Ljava.io.FilenameFilter;)[Ljava.lang.String;(Unknow
    n Source)
            at com.bea.p13n.management.ApplicationFilePoller.searchDirs(Ljava.lang.S
    tring;Ljava.util.Map;)V(ApplicationFilePoller.java:719)
            at com.bea.p13n.management.ApplicationFilePoller.searchDirs()Ljava.util.
    Map;(ApplicationFilePoller.java:708)
            at com.bea.p13n.management.ApplicationFilePoller.check()V(ApplicationFil
    ePoller.java:671)
            at com.bea.p13n.management.ApplicationFilePoller.access$200(Lcom.bea.p13
    n.management.ApplicationFilePoller;)V(ApplicationFilePoller.java:145)
            at com.bea.p13n.management.ApplicationFilePoller$PollerThread.checkAllPo
    llers()V(ApplicationFilePoller.java:997)
            at com.bea.p13n.management.ApplicationFilePoller$PollerThread.run()V(App
    licationFilePoller.java:953)
            at java.lang.Thread.run()V(Unknown Source)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
    e)
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi
    Thanks for reply bposner. I am using 'weblogic' user to deploy the application. Please help me to dig out this problem.
    This problem seems linked with Java Security manager. How can I disable Java Security Manager or what permission should I add in security file to resolve this problem.
    Thanks
    Edited by arafique393 at 08/16/2007 11:23 PM
    Edited by arafique393 at 08/17/2007 4:47 AM

  • Java.security.AccessControlException: access denied when loading from a jar

    Hello!
    I am trying to deploy an applet into a browser but I have encountered a security problem.
    The name of the applet is SWTInBrowser(not exactly mine, it's an example from the web).
    package my.applet;
    import org.eclipse.swt.awt.SWT_AWT;
    import java.applet.Applet;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.Canvas;
    import org.eclipse.swt.widgets.Shell;
    import org.eclipse.swt.widgets.Display;
    import org.eclipse.swt.SWT;
    import org.eclipse.swt.widgets.Listener;
    import org.eclipse.swt.widgets.Event;
    import org.eclipse.swt.graphics.Point;
    import org.eclipse.swt.layout.FillLayout;
    public class SWTInBrowser extends Applet implements Runnable{
         public void init () {
               /* Create Example AWT and Swing widgets */
               java.awt.Button awtButton = new java.awt.Button("AWT Button");
               add(awtButton);
               awtButton.addActionListener(new ActionListener () {
                public void actionPerformed (ActionEvent event) {
                 showStatus ("AWT Button Selected");
               javax.swing.JButton jButton = new javax.swing.JButton("Swing Button");
               add(jButton);
               jButton.addActionListener(new ActionListener () {
                public void actionPerformed (ActionEvent event) {
                 showStatus ("Swing Button Selected");
               Thread swtUIThread = new Thread (this);
               swtUIThread.start ();
              public void run() {
               /* Create an SWT Composite from an AWT canvas to be the parent of the SWT
              widgets.
                * The AWT Canvas will be layed out by the Applet layout manager.  The
              layout of the
                * SWT widgets is handled by the application (see below).
               Canvas awtParent = new Canvas();
               add(awtParent);
               Display display = new Display();
               Shell swtParent = SWT_AWT.new_Shell(display, awtParent);
    //           Display display = swtParent.getDisplay();
               swtParent.setLayout(new FillLayout());
               /* Create SWT widget */
               org.eclipse.swt.widgets.Button swtButton = new
              org.eclipse.swt.widgets.Button(swtParent, SWT.PUSH);
               swtButton.setText("SWT Button");
               swtButton.addListener(SWT.Selection, new Listener() {
                public void handleEvent(Event event){
                 showStatus("SWT Button selected.");
               swtButton.addListener(SWT.Dispose, new Listener() {
                public void handleEvent(Event event){
                 System.out.println("Button was disposed.");
               // Size AWT Panel so that it is big enough to hold the SWT widgets
               Point size = swtParent.computeSize (SWT.DEFAULT, SWT.DEFAULT);
               awtParent.setSize(size.x + 2, size.y + 2);
               // Need to invoke the AWT layout manager or AWT and Swing
               // widgets will not be visible
               validate();
               // The SWT widget(s) require an event loop
               while (!swtParent.isDisposed()) {
                if (!display.readAndDispatch()) display.sleep ();
    }It works perfectly in the Applet Viewer, but not in the browser. In the browser, I only get two buttons working, the SWT button doesn't appear, because of this error:
    Exception in thread "Thread-21" java.lang.ExceptionInInitializerError
         at org.eclipse.swt.widgets.Display.<clinit>(Display.java:130)
         at my.applet.SWTInBrowser.run(SWTInBrowser.java:52)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:167)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
         at org.eclipse.swt.internal.C.<clinit>(C.java:21)
         ... 3 moreI have exported the application in a jar, and in that jar I have put the swt.jar that the application need for the displaying of the third button, swt button.
    Here is also the HTML file:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
        <title>
          Test
        </title>
      </head>
      <body>
        <p>
              <applet code="my.applet.SWTInBrowser"
                        archive="Test.jar"
                        width="1400" height="800">
              </applet>
        </p>
      </body>
    </html>Could anyone please help me solve this problem?

    This is in reply to the first post. I don't know what happened after.
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:167)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
         at org.eclipse.swt.internal.C.<clinit>(C.java:21)
    If you read the above trace from bottom to top, it shows none of you classes, only classes from that Eclipse library, which seems to loadLibrary() a native DLL. In order to do this, it needs to call System.getProperty( "sun.arch.data.model" ). This call is not allowed from un unsigned applet. So I guess you need to sign the applet and this problem will go away. Many other problems may follow. Just read very very carefully all the related documentation, which I did not.

  • System.getProperties() results in java.security.AccessControlException

    Hi All,
    I'm building an web service that needs to make an URL connection.
    In order to build the connection, I must set the proxy.
    The problem is it seems that I cannot do
    Properties Sys=System.getProperties();
    since it results in the following exception :
    java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)
    here is part of my code (part of the implementation of the SEI of my web service)
    Properties Sys=System.getProperties();
    Sys.put("proxySet","true");
    Sys.put("proxyPort","8080");
    Sys.put("proxyHost","webcache.singapore.sun.com");
    URL url = new URL("http://www.geobytes.com/IpLocator.htm?GetLocation");
    URLConnection conn = url.openConnection();
    conn.setDoOutput(true);
    I'm using SUN App Server 8, my IDE is netbeans 4.1
    Any other way in setting the proxy without getting properties from my system? or any work around to make my code working. Please help me, any suggestions are highly appreciated.
    Regards,
    maggy

    I have changed the server.policy and adding the read access permission, now everything can work properly.
    thanks

  • Java.security.AccessControlException using AccessController.doPrivileged

    Hi all,
    i'm working with a signed applet in which i need to load a dll. I know that accessing a local dll is not so simple, but as i've read around on the net it should be possible using the AccessController.doPrivileged method to get permissions on a block of code. Even if it is not so safe.
    But i'm still getting following exception
    - Exception
    java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.C:\Program Files\....\dllname.dll)
    even if the dll access is done inside a privileged block of code as follows
    WebBrowser browser = (WebBrowser) AccessController.doPrivileged(new PrivilegedAction() {
      public Object run() {
        Xpcom.initialize();
        browser = WebBrowserFactory.getInstance().createBrowser();
        browser.navigate(url);
        return browser;
    });I didn't change anything else (java.policy file for example).
    Am i missing something? Shouldn't the privileged block let me avoid AccessControlException? (Please note that i get the same exception with or without the privileged block).
    Thank you very much for your help.
    Edited by: notsokevin on Aug 21, 2009 6:44 AM

    Hi,
    adding the following permissions in the policy file helped:
    grant {
    // following two permissions allow
    // access to default config files
    permission java.io.FilePermission
              "/path/to/mail.jar", "read";
    permission java.io.FilePermission
              "/path/to/activation.jar", "read";
    // following to use SMTP
    permission java.net.SocketPermission
              "SMTPHOST:25", "connect,resolve";
    // following needed if System.getProperties() is used
    permission java.util.PropertyPermission
              "*", "read,write";
    Thank you.
    - cheers
    Sakthi

  • Java.security.AccessControlException when accessing user documents

    Hello there,
    I'm a student programmer. I'm trying to write a desktop application which will read all of the user's documents folder and add it to a ZIP file. I am coding on Windows Vista but my code should be platform independent.
    The problem I have is that whenever I try to access the user documents, I get a java.security.AccessControlException. The code I'm using follows:
    //Find out the user's "My Documents" folder
    javax.swing.JFileChooser fr = new javax.swing.JFileChooser();
    javax.swing.filechooser.FileSystemView fw=fr.getFileSystemView();
    //Zip the contents of "My Documents" to the current working directory
    zip(fw.getDefaultDirectory().toString() + "\\", "JemsFrom.zip")
    //Checking for permissions for reading source       
    FilePermission perm = new FilePermission(source, "read");
    AccessController.checkPermission(perm);I Googled and apparently I need to add a policy file allowing my program access to the documents folder. I created the following policy file:
    grant {
          permission java.io.FilePermission "C:\\Users\\keith\\Documents", "read";
    };I saved this file as 'perms' and then added the following to Netbeans' Argument list for this project:
    -Djava.security.manager -Djava.security.policy=permsHowever, I am still getting this error and am totally stumped. I've also tried running this project outside Netbeans with those arguments but I get the same result.
    Would greatly appreciate any help.

    I have changed my permissions file as david_david suggested, but I am still having the same problem... AccessControlException
    Any other helpful suggestions would be welcome.

Maybe you are looking for

  • How do I populate the choices in a Combo Box in a PDF Form from an Excel spreadsheet or text file?

    Pleasel let me know if there is a way to copy and paste choices for a Combo Box from an Excel spreadsheet or text file.  I have over 250 values I'd like to add and don't trust my typing! Thanks for the help! Ken K. - 2191

  • How can I set the graph on the panel as buttons?

    Hi all, I'm trying to control a camera by sending DO control signals and acquiring AI signals. After I grab a whole image, and show it on the screen, I want to set it as 2D array of bool controls. So that I can click certain pixels, to send next cont

  • Control Characters in Data

    I've created a simple table with 2 rows. When I query the table for an individual row (where id = 1), my return set has control characters in between 2 columns...sometimes. If I select * from the table, I get a core dump, then a Oracle sqlplus error

  • HOW TO USE LEXICAL PARAMETER IN FORMS9I

    CAN I USE LEXICAL PARAMETER IN FORMS9I I WANT TO CREATE QUERY LIKE THIS SELECT * FROM &TABLE_NAME WHERE &CHOICE WHERE &TABLE_NAME = EMP, AND &CHOICE EMPNO=12344 PLS HELP

  • Subclip timecode issues for MultiClip edit...Help!?!?

    Here is the issue. 2 camera shoot, Cameraman 1 pushed pause during a live concert video shoot. In order to make a multiclip edit with the other camera's footage, I have made subclips of this camera's footage on each side of the pause. The other camer