• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

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
0
KouKi
Asked:
KouKi
1 Solution
 
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
 
kiranhkCommented:
how r u giving the path to the pictures in your code?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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
 
kiranhkCommented:
use
new ImageIcon(this.getClass().getResource("down.gif"));
or

new ImageIcon(this.getClass().getResource("images/down.gif"));
0
 
KouKiAuthor Commented:
Thanks !!!!!!! :-)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now