Tim Moores wrote:Do you really want to access a file named "filename" (and not the one specified by the filename parameter passed into the method)?
Oh, oops.
Even after I fixed "boolean exists = (new File(fileName)).exists();" the problem still persists.
The reason I put that exists thing up anyway was to try to narrow down this problem.
This looks odd. Why are you using the resource loading mechanism instead of "ImageIO.read(fileName)"? That would cause the file to be searched for at a different location than what the file name specifies.
Also make sure that the account running this code has read access to all (intermediate) directories and files.
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
a bit of art, as a gift, that will fit in a stocking