Unable to locate: Texture

I have a wired problem, I've loaded a model and it works fine in NetBeans model shows up with the texture but if i try opening the jar directly the model shows up but with out the texture and I get the Unable to locate Warning in the Console (the texture is located in the src dir and thus should be in the jar once compiled).



If I try and add the same texture to a box it come up fine.

If you are building your jars with netbeans I believe there is a way to tell it which files to include, but by default they are only the .class files. Most likely the texture file is really absent from the JAR. Try extracting your jar into a new directory to check its contents.



(HINT: You could change its extension to zip and decompress it directly)

Put your textures into the "build" folder.

duenez said:

If you are building your jars with netbeans I believe there is a way to tell it which files to include, but by default they are only the .class files. Most likely the texture file is really absent from the JAR. Try extracting your jar into a new directory to check its contents.

(HINT: You could change its extension to zip and decompress it directly)

Trussell said:

Put your textures into the "build" folder.


Yes i've done both of these, as i said, I can load the image directly onto a box but it just wont load when i load the model

That would point to either the name of the texture (and path) in the model file, or the way the loader is loading it.

renanse said:

That would point to either the name of the texture (and path) in the model file, or the way the loader is loading it.


Yep it was the name of the texture, the model refared to it in all caps where as it was all lower.
Netbeans must have interpted it differently
Vanhal said:

Netbeans must have interpted it differently

Windows did it, not NetBeans. Microsoft's operating systems have the nasty habit of being case insensitive regarding filenames, whereas Unix and Java are not.
That's why the jar classloader properly distinguishes upper/lower case while the filesystem classloader (which NetBeans uses when running projects) does not when running on Windows.