Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

imageio read returns null

952145Jul 27 2012 — edited Jul 27 2012
I have a program that reads an image from inside a jar (buillt dynamically in code) using ImageIO.read(URL);

This works fine and I can read the image as many times as I like. However, if I rebuild the jar in code and try to read the image of the same name a second time the read returns null without throwing any Exceptions.

It's as if java has cached the stream to the original file even though I have created a new URL.

Any ideas anyone?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2012
Added on Jul 27 2012
18 comments
1,834 views