J
JavaEnquirer
I have no problems loading an image from a jar using a class which
shares that jar. However, if I have a utility jar which contains a
ImageLoader utility class and use this class from my main application
jar which contains the images, I get a null pointer exception on
createImage.
( I'm using the utility class's class loader and calling the get
resource method. ) I don't get a problem running my application
jar-less in Eclipse.
When I got this error I assumed that by default you can only load a
resource from the same jar. So, I put the images into the utility jar
too, but to no avail - the same error.
Anyone got any pointers? Is there a way of loading resources from other
jars as I'm trying to do?
many thanks in advance.
shares that jar. However, if I have a utility jar which contains a
ImageLoader utility class and use this class from my main application
jar which contains the images, I get a null pointer exception on
createImage.
( I'm using the utility class's class loader and calling the get
resource method. ) I don't get a problem running my application
jar-less in Eclipse.
When I got this error I assumed that by default you can only load a
resource from the same jar. So, I put the images into the utility jar
too, but to no avail - the same error.
Anyone got any pointers? Is there a way of loading resources from other
jars as I'm trying to do?
many thanks in advance.