Some helpful hints on file handling in
Java:
1. Use "Unix"-style naming. For example:
That way you'll be better prepared if the production server runs Solaris or Linux or anything other than Windows. AND you won't risk getting zapped by stray backslashes!
2. Use the file constructor that builds directory file locations. Not this:
But this:
That way you don't have issues with (os-dependent) filename path separators.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.