Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make jar in eclipse

 
Vivek Moyal
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse related questions should be asked in the IDE forum.
Moving.
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may i send you the code than send me the jar
 
Vivek Moyal
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i am using the image like this in code
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic