morticiancorax
Messages postés27Date d'inscriptiondimanche 28 février 2010StatutMembreDernière intervention18 mai 2010
-
22 avril 2010 à 03:22
cs_DARKSIDIOUS
Messages postés15814Date d'inscriptionjeudi 8 août 2002StatutMembreDernière intervention 4 mars 2013
-
22 avril 2010 à 07:48
Hi everybody,
I am developing standalone application using NetBeans,the aplication is running fine in netbeans IDE but not when Jar alone tried to run.I kept all the files related to application with the jar.
when running jar,the app is running fine upto some extent,and throwing exception at the time of fetching images from images folder which is placed inside "src folder"
class files package and images folder are in the src folder. the code is like this:
mLogo = new JLabel();
URL lUrlLogo = getClass().getResource("/images/eaze.gif");
System.out.print(lUrlLogo);
Image lLogoimage = Toolkit.getDefaultToolkit().createImage(lUrlLogo);//.getImage(lUrlLogo);
ImageIcon licon = new ImageIcon(lLogoimage);
mLogo.setIcon(licon);
i tried by using Mainclass.class.getResource("/images/eaze.gif");
and also by using thread but dint solved
The exception is like this:
Uncaught error fetching image:
java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:99)
at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:113)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
cs_DARKSIDIOUS
Messages postés15814Date d'inscriptionjeudi 8 août 2002StatutMembreDernière intervention 4 mars 2013130 22 avril 2010 à 07:48
Salut,
Pourquoi tu parles anglais ? Tu es sur un forum francophone ici, donc soit tu es anglais, et à ce moment là pose ta question que un forum américain plutôt (il en existe des centaines), soit tu pensais qu'en écrivant en anglais, ton post serait lu par plus de monde, mais là c'est le contraire, puisque tout ceux qui viennent sur codes-sources parlent français.
______________________________________
AVANT de poster votre message, veuillez lire, comprendre, et appliquer notre réglement