aspose file tools
The moose likes Beginning Java and the fly likes Bundle picture files in a jar file? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Bundle picture files in a jar file?" Watch "Bundle picture files in a jar file?" New topic
Author

Bundle picture files in a jar file?

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
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


You down with OOP? Yeah you know me!
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
Justin, I guess you can add image files to the jar as well.
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
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

Joined: Mar 28, 2005
Posts: 133
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.


She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bundle picture files in a jar file?
 
Similar Threads
best way of common application jar (xxx.jar,spring.jar,etc...)using path in websphere 7
Is this possible...?
Classpath and Jar file
Spring 3.0.6 classpath issue.
jar file prob