I've never been able to access compressed content (such as the resources in a jar) using URLs. I have always had to use Streams. I assume because the URLs can't decompress the files or something. I'm...
Type: Posts; User: aussiemcgr
I've never been able to access compressed content (such as the resources in a jar) using URLs. I have always had to use Streams. I assume because the URLs can't decompress the files or something. I'm...
Ok. Tell me how that goes. I'm pretty sure that jars do not like you accessing their resources with anything other than Streams. URL is not a Stream, but accessing the Image with the ImageIO.read()...
Have you tried using ImageIO?
BufferedImage cardIconImage = ImageIO.read(this.getClass().getResource(iconName));
return new ImageIcon(cardIconImage);