It sounds like eclipse is putting the .class files in a different folder from your .java files, which is pretty normal. Oftentimes, people will store the images in a separate folder, then do...
Type: Posts; User: KevinWorkman
It sounds like eclipse is putting the .class files in a different folder from your .java files, which is pretty normal. Oftentimes, people will store the images in a separate folder, then do...
Your code works for me, if I create a ghost.jpeg image and place it in the same folder as my .java and .class files.
Are you using packages? Are you sure you have the filename right (jpg vs jpeg,...
Sounds like it. You might want to check where the class files (as opposed to the .java files) are located. Or you might want to use the full path.
Or you could try printing out the full path of...
What happens if you do this:
System.out.println(new File("ghost.jpeg").exists());