permaculture playing cards*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes images in the client.jar? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "images in the client.jar?" Watch "images in the client.jar?" New topic
Author

images in the client.jar?

Nate Johnson
Ranch Hand

Joined: May 13, 2002
Posts: 301
Hello all,
I have a toolbar for booking, seaching, etc. that uses images as the buttons. Is there a way to put those images in the client.jar file so that my client does not require the images folder to be in the same directory as the client.jar? The same happened when I put my help.html file in the jar... the client could not find it. If they are sitting in the directory with the jar, everything is cool.
Thanks,


scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Vadiraj Deshpande
Ranch Hand

Joined: Aug 16, 2000
Posts: 78
Originally posted by Nate Johnson:

Is there a way to put those images in the client.jar file so that my client does not require the images folder to be in the same directory as the client.jar? The same happened when I put my help.html file in the jar... the client could not find it. If they are sitting in the directory with the jar, everything is cool.

Hi All,
Even I've experienced this. Could some one please shed more light on this. I read some where about JARResource class which reads the contents of a jar file. Should that be used?
:roll:
Thanks in advance,
Vadiraj
[ August 08, 2002: Message edited by: Vadiraj Deshpande ]
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

Is there a way to put those images in the client.jar file so that my client does not require the images folder to be in the same directory as the client.jar?

Yes, there is. Try something like this to load images from JAR:

Eugene.
Nate Johnson
Ranch Hand

Joined: May 13, 2002
Posts: 301
Thanks Eugene! That worked great.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: images in the client.jar?