Jump to content

error when trying to paint image

Recommended Posts

I'm having a permissions error when trying to read with ImageIO.

[INFO][Bot #1][12/30 12:46:45 PM]: Loaded 2 built-in random solvers!
[ERROR][Bot #1][12/30 12:46:45 PM]: Blocked permission: ("java.io.FilePermission" "resources\biohazard.png\biohazardQuest.png" "write")
[INFO][Bot #1][12/30 12:46:45 PM]: Terminating script coconut oil...


Here's the code:

try {
    File file = new File("resources\\biohazard.png\\biohazardQuest.png");
    FileInputStream fis = new FileInputStream(file);
    BufferedImage biohazardQuest = ImageIO.read(fis);
} catch(IOException e) {


if anyone has any ideas, please shoot them my way


also, when I try to just read directly with this

biohazardQuest = ImageIO.read(new File("resources/biohazard.png/biohazardQuest.png"));

I face a similar issuse, "can't read input file."

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...