| Author |
How to make jar in eclipse
|
Vivek Moyal
Ranch Hand
Joined: Nov 02, 2009
Posts: 57
|
|
I m trying to export but eclipse is not including the images folder and dont show a single image
so how i can so this
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8563
|
|
Eclipse related questions should be asked in the IDE forum.
Moving.
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8563
|
|
When you choose Project->Export->Jar the UI allows you to select the resources. Are you sure you have selected the images?
|
 |
Vivek Moyal
Ranch Hand
Joined: Nov 02, 2009
Posts: 57
|
|
|
Still not including the image I have only one image that i m using at system tray but when i make the jar there is a blank space not the picture at system tray
|
 |
Vivek Moyal
Ranch Hand
Joined: Nov 02, 2009
Posts: 57
|
|
|
When i extract it i got the image in image folder but it is not showing when i m trying to run the program program is running but not using the Images but it is also showing the .java file which i dont want to show
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8563
|
|
Ok. So the image file is packaged properly.
In your code, how are you loading the image? You need to use getClass().getResource() since the image is inside the jar.
When you open the export as jar dialog, there is a checkbox for "Export java source files and resources". If that is unchecked, it will not put the java files inside the jar.
|
 |
Vivek Moyal
Ranch Hand
Joined: Nov 02, 2009
Posts: 57
|
|
|
may i send you the code than send me the jar
|
 |
Vivek Moyal
Ranch Hand
Joined: Nov 02, 2009
Posts: 57
|
|
i am using the image like this in code
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8563
|
|
|
http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html#getresource
|
 |
 |
|
|
subject: How to make jar in eclipse
|
|
|