Hey i am currently trying to read the byte contents of an image into a byte array in java but cant seem to open the image from file. The console is throwing this exception:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
This here is the line in question:
BufferedImage im =
ImageIO.read(
new File(
getClass().getResource( "/Images/default_pic.png" ).toURI()));
My packages look like this:
-UI
-Class //code getting image here
-UI.Images
-default_pic.png