• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cant load images from my jar

 
Yaroslav Chinskiy
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I have images stored in one of the packages.

i run a sample app that has to load a splash screen.
the app is in com.bla.tst package, the images are in com.bla.images
i can never resolve URL to load them:




Pleas advice.
Thank you
 
clio katz
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yaroslav,

Looks like you have your packages all jar'red-up (correct me if i'm wrong).

There are several ways to get at the images. I usually create a single 'images' directory in the jar, but if you need multiple dirs ... no problem.

Here are some programming notes i made for myself some time ago:



Regarding the path, if you are loading from the JAR, you can use the relative path eg.


hth!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic