Jump to content

error when trying to paint image


Recommended Posts

Posted

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) {

    log(e);
}

if anyone has any ideas, please shoot them my way

thanks 

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."

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...