In most cases in
Java, you can use the "Unix" syntax. So one possibility is something like "C:/Program Files/MySystem/myfile" (quotes required) or "C:/Program\ Files/MySystem/myfile".
More commonly, what you do is find the alias 8.3 version of the offending component, which gives you something like "C:/PROGRA~1/MySystem/myfile", or, if you insist: "C:\PROGRA~1/MySystem/myfile". Real pedants wil note that "MySystem" isn't a valid 8.3 construct either and should thus also be subbed, but it really doesn't matter there, since there's no spaces and Java is OK with long and funny names - it's only the command-line parser that gives the problems.
"Program Files" isn't ALWAYS named PROGRA~1, BTW. The algorithm is a bit of first-come-first served and varies slightly between versions of windows. In XP, the "/X" option of the DIR command is one way to find the right name.
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.