I am trying to load and draw it with paint method in java whatever the way I write the path it always shows an exception
java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(Unknown Source)
I have the image at the same folder with the class
This is the line that I am loading image in
Image img = ImageIO.read(getClass().getResourceAsStream("pepsi.png"));
See Question&Answers more detail:os