--- Tim Kettler <[EMAIL PROTECTED]> schrieb am Do, 5.6.2008:

> it seems this is
> a misunderstanding on your side. The constructor you are
> using is intended to load images out of files on the 
> filesystem and not to load an image from a classpath 
> resource. The correct way to load images from
> resources would be to get a stream of the resource from a
> classloader and then pass this to the image constructor.

I tried all this and it didn't work.
It worked, of course, after I changed the manifest.
But the simple solution works then either.

The problem with streams is that You have to close
them (without closing the image).

So it works that way, why not use it?
Why producing overhead instantiations?
If You have 200 images in Your app You wouldn't
open and close 200 streams!

> I don't understand why this helps in your situation 

Because when the app has NO outside resource it looks
for additional paths in the jar file too WITHOUT extra
classpath entries.

But, as I said, I have outside resources like
config files. A classpath entry in manifest forces
the app to look inside the jar.

> but the need to add the 'img' directory to the
> classpath should go away
> if you load the images properly as classpath resources.

No, this had no effect, I have tested all variants.




      __________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to