Re: Accessing picture file in a jar file
Posted by
Joris FA Meys on
Feb 06, 2009; 3:45pm
URL: http://imagej.273.s1.nabble.com/Accessing-picture-file-in-a-jar-file-tp3693821p3693823.html
Now I think about it, my class has some nested classes inside. I used the
jar command "jar cvfM Frap_Norm.jar *" to pack everything. Can it be that
this messes up with the package thing? I have to admit, I'm quite a newbie
at Java. It's my first in fact...
On Fri, Feb 6, 2009 at 4:16 PM, Johannes Schindelin <
[hidden email]> wrote:
> Hi,
>
> On Fri, 6 Feb 2009, joris meys wrote:
>
> > I want to access a .jpg file in the jar file I constructed for
> > distribution of my plugin. It's a picture with the "About" information,
> > like the "ImageJ About". If the picture itself is in the plugin
> > directory, it works perfectly fine. However, if it's only in the
> > jar-file, it doesn't want to find the picture. What am I doing wrong?
>
> Are you sure that the class is read from the .jar file right where the
> image is? Or is the class in a package, while the image is on the
> top-level of the .jar file?
>
> Ciao,
> Dscho
>