Hai I have an application which is designed in netbeans6.0.1 where i need to display an image as an logo.My coding is as below
mLogo = new JLabel();
URL lUrlLogo = getclass().getResource("/com/images/image.gif");
Image lLogoimage = Toolkit.getDefaultToolkit().getImage(lUrlLogo);
ImageIcon licon = new ImageIcon(lLogoimage);
mLogo.setIcon(licon);
My code works fine when i execute it in netbeans but when I try to run my jar file which is created by netbeans in dist folder,it gives me an exception
Uncaught error fetching image:
java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(Unknown Source)
at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
Whats the problem with my jar Can some one help me to run my jar Thanking u