My web application runs on Windows. I would like to run my app on Linux also. I seem to have overcome most of the problems such as path separator, etc.
Real problem now is I get FileNotFoundException when the Java code tries to open a file say Abc.txt when only abc.txt exists. 🙁
I can’t go on changing all the filenames to lowercase or uppercase as i have a whole lot of files. Without changing code much is that any possible way to avoid this?
There is no way to avoid this as the
java.io.FileAPI is system-dependent. You have to use the right case when manipulating files on Linux/Unix. Actually, my advice/solution would be to follow strict and portable conventions during development on Windows (e.g. use lower case filenames only or, better, use the exact file name when accessing it programmatically). To be honest, I don’t understand why you are trying to loadAbc.txtwhen the filename isabc.txt. This is a bad habit (taught by spending too much time on Windows) rather than a Linux/Unix problem.