Milton Clark
asked on
A problem with redirect on Windows command line
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.l og
Where is this "1" coming from, and what do I do to avoid it?
Thanks.
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
Where is this "1" coming from, and what do I do to avoid it?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the info... Can you point me to a more detailed discussion of redirect under Windows?
Thanks again.
Thanks again.
You could really always give out grade of 'A'.
In my opinion the grading system in EE is worthless. To ask a person who knows nothing about the solution other than what you've given them to grade a question that affects the overall points given to the expert is disturbing... At least to me :)
No back to the question:
http://www.robvanderwoude.com/index.html
In my opinion the grading system in EE is worthless. To ask a person who knows nothing about the solution other than what you've given them to grade a question that affects the overall points given to the expert is disturbing... At least to me :)
No back to the question:
http://www.robvanderwoude.com/index.html
ASKER
Thank you on all counts, Steve.
ASKER
The second segment, with the "@" once again stopped any further output to the command line window, so I tried it without "@" and got a similar problem/outcome:
C:\>("C:\Program Files\Java\jdk1.5.0_11\bin
So, to clarify, I want a way to redirect the output to the logfile, but I also need to see output in the command line window to see what is/is-not executing, and correctly or not.
Thanks.