DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2006

    applet access denied to java.io.tmpdir

    I have an applet that I'm developing in Eclipse. When I run it with the Eclipse Applet Viewer it works fine but when I try to run it from my local copy of Tomcat I get the following error:

    java.security.AccessControlException: access denied (java.util.PropertyPermission java.io.tmpdir 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.pdfbox.pdfparser.PDFParser.<init>(PDFParser.java:72)
    at org.pdfbox.pdfparser.PDFParser.<init>(PDFParser.java:85)
    at org.pdfbox.pdmodel.PDDocument.load(PDDocument.java:577)
    at FormApplet.updatePreview(FormApplet.java:292)
    at FormApplet.initDoc(FormApplet.java:220)
    at FormApplet.initComponents(FormApplet.java:104)
    at FormApplet.init(FormApplet.java:79)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Is this a problem with the applet or possibly a problem with the server setup? I haven't been able to find anything online. Any help is greatly appreciated.


  2. #2
    Join Date
    Jun 2006
    Thanks for your posting. I had the problem about a week later. It turns out that PDFParser.java in the package PDFBox attempts to get a temporary file on the user's disk. In a Java applet this is not allowed, hence your AccessControlException.

    I got around this by placing my code in a signed JAR file, and signed the PDFBox JAR file as well (I didn't check to see if this was necessary). Once I accepted the certificate, Java allowed PDFParser to read and write temporary files.

    I posted a similar query in the "Bugs" forum at http://www.pdfbox.org/, in the hopes that the author will find a way to fix this problem. May I suggest that you do the same, as the more people with the same request, the more likely it will be fixed.

    As for the program working in Eclipse but not in Tomcat, I would have to speculate that Eclipse is not setting up the normal applet restrictions for you. As I've never used either, I can only speculate on this point.

  3. #3
    Join Date
    Feb 2006
    Cologne - Germany
    have a look at the discussion at

Similar Threads

  1. Replies: 5
    Last Post: 09-03-2013, 03:59 AM
  2. Replies: 4
    Last Post: 03-16-2006, 05:23 PM
  3. SQL Server does not exist or access denied
    By Aruna in forum ASP.NET
    Replies: 1
    Last Post: 04-30-2002, 01:07 PM
  4. Access to the registry key is denied.
    By Prabhakar in forum ASP.NET
    Replies: 0
    Last Post: 04-29-2002, 06:34 PM
  5. Access denied error HELP!!!
    By Ryan in forum VB Classic
    Replies: 5
    Last Post: 04-25-2000, 03:11 PM

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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

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