Because the Executor uses the cmd.exe to launch the command - if an argument contains a < or a > this gets interpreted by cmd as an input/output redirection and causes the command to fail. The fix for this should be fairly easy. An extra OR clause in the quoteArgument method of the Commandline class. // WIN9x uses a bat file for executing commands || (IS_WIN_9X && argument.indexOf(';') != -1) || (IS_WIN_9X && (argument.indexOf('<') || argument.indexOf('>')) != -1)
The situation is a bit more complex since the same escapes would apply to anything executed via any of the launchers that use a separate interpreter (ScriptCommandLauncher, OS2CommandLauncher, WinNTCommandLauncher and potentially PerlScriptCommandLauncher - I don't know enough about Netware). So escaping things based on the OS would be wrong, it would have to happen based on the launcher. Even Win95 should use the Java13CommandLauncher by default, doesn't it?