Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8132985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:28:42+00:00 2026-06-06T09:28:42+00:00

I have created an applet within a web page, but whenever I run it,

  • 0

I have created an applet within a web page, but whenever I run it, I get this:

Exception in thread "Thread-13" java.security.AccessControlException: access denied ("java.io.FilePermission" "defensebg.png" "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 javax.imageio.ImageIO.read(Unknown Source)
    at Defense.run(Defense.java:63)
    at java.lang.Thread.run(Unknown Source)

How do I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:28:43+00:00Added an answer on June 6, 2026 at 9:28 am

    Since I know a little about your applet and am convinced these images are an inherent part of the application, I will take a different tack to paulms4.

    Forget the File instances. They are neither workable for this, nor necessary. Only a trusted applet can access a File, but even then, the only place that an applet can establish a File is one that points to locations on the file-system of the user’s PC. Obviously the images for your applet are not available that way (OK – they might be in a browser cache, but that is no use to us).

    It would be more typical (& easier) to access applet resource by URL. An URL can be established relative to the code-base or document-base of the applet. If the images are actually inside a Jar, they become an embedded resource – see the info. page as to how to gain an URL.

    Most of the methods in the J2SE that load a ‘read only’ resource will accept File, URL or InputStream. I use URL most often for the generic utility of it. An URL can represent a web resource, a file on the local file system, or a resource buried deep inside a Jar file (whether or on the web or the local file-system).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have created a Self Signed Applet , but not able to access
I have a need to integrate a third-party Java applet into a custom web
We have a Java Applet built using AWT. This applet lets you select pictures
I have created an applet for recording sound. It throws an exception when I
I have created a voice recorder applet. The output sound file will be .wav
I have created an applet to read some info from a file on the
I've created a Java Applet in Netbeans that uses several external libraries. When I
This is a two part question. I have created a user agreement that the
I have created an applet program using Eclipse IDE. Now im creating .html file
I have created an applet that communicates with a MS Access database (or at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.