Having Problem loading Image from URL

Hi,
I’m having problem loading Url images from jar file.
The image files are in the same package as the Class

By using this source loading resource in eclipse works fine:


for(int i=1;i<=6;i++){
URL url =CanvasResourceViewеr.class.getClassLoader().getResource("r"+i+".png");
this.resourceImages[i-1] = ImageIO.read(url);
}

But when i Export it in jar file i get an error:
java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(Unknown Source)
at client.framework.CanvasResourceViewer.(CanvasResourceViewer.jav
a:22)
at client.local.GameClient.(GameClient.java:65)
at client.local.Run.main(Run.java:25)
Any ideas ?