• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bundle picture files in a jar file?  RSS feed

 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok i have a GUI that i am making into a jar file, but how do you get the
.GIF files to bundle in with it?

cause the jar file (after execution) will show the pictures if in the same
folder, but when i move it out, it won't?

Thanks,


Justin Fox
 
Abdulla Mamuwala
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Justin, I guess you can add image files to the jar as well.
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried to do so, but the images wont show up if i move the .jar file to another directory?

would anyone know why?


Justin Fox
 
Jaime M. Tovar
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i have to work with resources like images in a jar i usually try with the

YourObject.getClass().getResourceAsStream() or similar methods it makes cleares to the VM where to look for the files.
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, well here is another question for yall its rather a cal question.

i have the exponential/logarithmic function..




but now what do I do?

please help,


Justin Fox
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!