On Windows, a file with a name of "README.txt" is the same as "readme.txt". On Linux, these are two completely separate files. This can make things tricky when developing Java code on Windows, and deploying on Linux. If your code references a resource (a file of some kind) with mixed capitalization in the file name, you must remember that referencing that resource may work on Windows but probably not on Linux.
Let's say you have "myresource.txt" in a directory. In Java ...
new File("MyReSoUrCe.tXt").exists() returns true on Windows.
new File("MyReSoUrCe.tXt").exists() returns false on Linux.
Granted, most people wouldn't put something ridiculous like "MyReSoUrCe.tXt" in their code. A more likely example is "MyResource.txt". But, you get the idea. BTW, I have no significant personal preference with regards file name case sensitivity. However, I suspect Microsoft intentionally left this file name case convention in place. Therefore, Windows would be backwards compatible with older DOS applications that expect "README" to be the same file as "readme".
Bottom line, just use an all lower case naming convention for any resources referenced by your code; regardless of what platform you are developing/deploying on. Doing so will save you many hassles in the long run.


Did you find this post helpful, or at least, interesting?