JAR weirdness

Just wanna ask whats up with java randomly changing file extensions from “.jpg” to “.JPG” and from “.png” to “.PNG”. So a few of the images do not show in an applet. Its annoying to have to check every image if its extension was changed.
And whats up with those pointless “Thumbs.db” files that are huge and in every folder inside my JAR. ???

PS. unrelated: If my jarsigning certificate expired, what does it mean? I didnt notice any change with my expired-jarsinger-signed applet…

Its not a very big problem thats why i posted it here.

I believe that its Windows thats at fault here and not java. Windows creates the Thumbs.db files in your folders and applications like paint have a bad habit of saving images with a *.PNG, *.JPG, etc caps case.

You can stop windows generating a Thumbs.db (which really annoy me when they get generated in an svn directory and it gets flagged as changed). From an explorer window go Tools->Folder Options. Then the “view” tab and uncheck “do not cache thumbnails”.

u mean check it? cause it was unchecked.
Well i checked it and it still puts Thumbs.db in the folders… Do i need to restart my computer for it to work?

I believe that its Windows thats at fault here and not java. Windows creates the Thumbs.db files in your folders and applications like paint have a bad habit of saving images with a *.PNG, *.JPG, etc caps case.

So u mean there is no way to prevent that? Maybe its my way of JARing. I use command line batch file to jar all the stuff cause my IDE’s jar-er totally sux.

Oops, yeah you need to check it. And it won’t clean up any existing Thumbs.db files, so you’ll have to go and delete them manually afterwards.

well, i checked it, then created a new jar file and it still puts those things in folders…
Anyways, its not a big problem, i only have to delete 5 of .db files every time. So is there a way to prevent windows from modifying file extensions?

Windows itself doesn’t change file extensions. However, MSPaint likes to use uppercase file extensions (because that interferes with case sensitive file systems ;)). Always use lowercase file extensions.

I don’t have any issues with thumbs.db because I use the detail view for all directories. If I want thumbnails I just click on one of the images (opens with irfanview) and then I only need to press T.

Once images get jarred they start changing their extensions. Their just fine outsida jar.
I have images made in paint and in a high-tech graphics program change extensions. So it gotta be something else. I just cant see any patterns in it…

Jars are case sensitive, the windows file system is not.

You do have “Hide extensions for known file types” disabled, don’t you? (explorer->tools->folder options->view)

[quote]You do have “Hide extensions for known file types” disabled, don’t you? (explorer->tools->folder options->view)
[/quote]
Well, i unchecked it and all it did is it added .exe to executables, .txt to text files, etc. It didnt affect JAR extensions whatsoever…

I was more thinking that you had the extensions for .png/.jpg hidden,
so through explorer you couldn’t tell whether they were lower/upper case.

The result being that only when they were jarred would:
a) the case of the extension become visible, and
b) a (negative) effect seen at runtime.

well i guess thats the problem… any solution?

As I already said… always use lowercase file extensions.

Oh i get it now. When i changed all the extensions manually from .PNG to .png and .JPG to .jpg it kept them to lowercase in the jar file. Stupid windows (of course Mac is an utter suicide so im not complaining). ;D