making a jar file

Hello again !

I finally finished my application using GUI and
I made a .jar file !
when I launch it Everything is OK but the pictures dont appear !
(I included them though !!)

Does anyone of you know how make those appear in my appli ?
Thanks
KouKiAsked:
Who is Participating?
 
kiranhkCommented:
use
new ImageIcon(this.getClass().getResource("down.gif"));
or

new ImageIcon(this.getClass().getResource("images/down.gif"));
0
 
CEHJCommented:
There could be any number of reasons for that! ;-)
0
 
KouKiAuthor Commented:
when i run my program in Eclipse, I have the pictures,
but when i export it into a jar file i can't see those anymore,
is it possible i need to use a MediaTracker in my program ?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
kiranhkCommented:
how r u giving the path to the pictures in your code?
0
 
KouKiAuthor Commented:
Im using Eclipse
I need to check what I need
I checked "default package" (all the classes are checked)
and "images" (and all the images are checked)
0
 
aviadbdCommented:

Yes, but how are the pictures referenced to in your code? (Not when you create the jar).

AviadBd.
0
 
KouKiAuthor Commented:
new ImageIcon("images/down.gif");
...
I have a directory images that containts all the pictures ..
I tried also to put ->
new ImageIcon("down.gif");
like this and have all the pictures in the project directory
but when i run the jar i still don't see any
0
 
KouKiAuthor Commented:
Thanks !!!!!!! :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.