Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

making a jar file

Posted on 2004-10-26
8
Medium Priority
?
306 Views
Last Modified: 2010-03-31
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
Comment
Question by:KouKi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12414769
There could be any number of reasons for that! ;-)
0
 

Author Comment

by:KouKi
ID: 12414803
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
 
LVL 8

Expert Comment

by:kiranhk
ID: 12414804
how r u giving the path to the pictures in your code?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:KouKi
ID: 12414929
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
 
LVL 3

Expert Comment

by:aviadbd
ID: 12415167

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

AviadBd.
0
 

Author Comment

by:KouKi
ID: 12415214
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
 
LVL 8

Accepted Solution

by:
kiranhk earned 404 total points
ID: 12415268
use
new ImageIcon(this.getClass().getResource("down.gif"));
or

new ImageIcon(this.getClass().getResource("images/down.gif"));
0
 

Author Comment

by:KouKi
ID: 12415361
Thanks !!!!!!! :-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question