• Post Reply Bookmark Topic Watch Topic
  • New Topic

images in the client.jar?  RSS feed

 
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ]
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eugene! That worked great.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!