A problem with redirect on Windows command line
Posted on 2007-03-29
I'm using CMD under Windows XP to get a command line. From there, I am issuing a java command with a number of arguments, and trying to redirect the output to a log file. Problem is (... and I seem to remember something like this many moons ago in my DOS days...) when the command executes, it inserts an additional "1" character before the redirect character ">" and as a result the redirect does not work.
Here's the command in the .BAT file:
"%JAVA_HOME%\bin\java" -Xms256M -Xmx512M -Duser.language=en -jar ofbiz.jar -install > framework\logs\console.log
.. and here are the results in the cmd window:
C:\>"C:\Program Files\Java\jdk1.5.0_11\bin \java" -Xms256M -Xmx512M -Duser.language=en -jar ofbiz.jar -install 1>framework\logs\console.log
Where is this "1" coming from, and what do I do to avoid it?