r/programmingbydoing • u/LAk389 • Jul 12 '16
#95-ImageDemo
copied both prog and image but showing this
Exception in thread "main" javax.imageio.IIOException: Can't read input file! at javax.imageio.ImageIO.read(ImageIO.java:1301) at programing_by_doing_2.ImageDemo.<init>(ImageDemo.java:16) at programing_by_doing_2.ImageDemo.main(ImageDemo.java:35)
1
Upvotes
View all comments
Show parent comment
1
u/breadkonqueso Jul 13 '16
Because I'm using an IDE i was getting the same error, tried copying the file to every folder in the project and it didn't work so instead, like /u/LAk389 i had to use the whole address of the file. Works with no problems if done through the command prompt though so its likely that his case is the same as mine or he just didn't put the image in the same location as the file with the code.