My Application uses some images.The application works fine in the Eclipse IDE.Here's the Code Snippet being used :
URL url=screen_one.class.getClassLoader().getResource("./small.png");
JLabel image=new JLabel(new ImageIcon(Toolkit.getDefaultToolkit().getImage(url)));
But when i export it to a jar , it shows Uncaught error fetching Image.I think its related to the path of the image "small.png".
But when i run "jar tvf" with my file name this is the output -
1635 Tue Apr 03 19:53:44 IST 2012 small.png
This suggests the path is correct ; So,Where am i wrong??
Thanks