aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes How to make jar in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How to make jar in eclipse" Watch "How to make jar in eclipse" New topic
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: 10255
    
    8

Eclipse related questions should be asked in the IDE forum.
Moving.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10255
    
    8

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: 10255
    
    8

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: 10255
    
    8

http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html#getresource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make jar in eclipse