Yes, in general, Python will be a much better alternative to shell.
But the specific problem here is that Java which is completely unaware of Cygwin, works with Windows paths and any Cygwin based scripting engine will understand only Cygwin paths and so they don't interact well. Another minor irritation is that under Windows Java's classpath separator is semicolon and under Unix, it is colon. There are the following options:
- Use relative paths always. Then the only difference between Cygwin and Windows paths is forward- versus back-slash. Windows API is fortunately okay with forward slash.
- Use cygpath Cygwin's path translation tool. This will lead to some kind "if (cygwin)" constructs in the scripts.
- Use ant. Since ant is a Java utility, it does the right thing for Windows.
None of these is a pretty solution. I'm leaning toward ant because, we already need ant (no new dependency) and we have (at least for now) just one small script to translate.