Batch File output to File with java twist

  • Thread starter Thread starter Graza
  • Start date Start date
G

Graza

I have written a batch file that uses about 5 menus before executing a
java class based upon the input from the user.

What i would like to do is have all the output from the java execution
being written to a file so that in the event of any problems they can
be quickly debuged (the actual execution times are pretty big in this
case) without having to repeat the process.

I've tried a number of different things I've seen on this and other
forums and have failed to find a solution to my problem.

The most common ones were the > or >> which creates a file then does
not display my interface followed by not actually recoring any of the
output. and command /c batfilename.bat >out.txt which just fails.

If anyone can help be here it would be much appreciated.
 
Graza said:
I have written a batch file that uses about 5 menus before executing a
java class based upon the input from the user.

What i would like to do is have all the output from the java execution
being written to a file so that in the event of any problems they can
be quickly debuged (the actual execution times are pretty big in this
case) without having to repeat the process.

I've tried a number of different things I've seen on this and other
forums and have failed to find a solution to my problem.

The most common ones were the > or >> which creates a file then does
not display my interface followed by not actually recoring any of the
output. and command /c batfilename.bat >out.txt which just fails.

If anyone can help be here it would be much appreciated.

You write
"The most common ones were the > or >> which creates a file then does
not display my interface followed by not actually recoring any of the
output. and command /c batfilename.bat >out.txt which just fails."

I cannot work out what you mean. Can you rephrase this and be
a little more specific?
 
You write
"The most common ones were the > or >> which creates a file then does
not display my interface followed by not actually recoring any of the
output. and command /c batfilename.bat >out.txt which just fails."

I cannot work out what you mean. Can you rephrase this and be
a little more specific?

I meant the most common "ouput" methods that I have seen are those the

batfilename.bat >outFileName.txt
batfilename.bat >>outFileName.txt
and the
command /c batfilename.bat >outFileName.txt

and neither of these capture quite what i need.
 
Graza said:
I meant the most common "ouput" methods that I have seen are those the

batfilename.bat >outFileName.txt
batfilename.bat >>outFileName.txt
and the
command /c batfilename.bat >outFileName.txt

and neither of these capture quite what i need.

Commands executed from the Command Prompt will capture
text output only, e.g.

SomeProgram.exe 1>standard.txt 2>error.txt

They will not capture graphical data. Are you trying to capture
graphical stuff?
 
Commands executed from the Command Prompt will capture
text output only, e.g.

SomeProgram.exe 1>standard.txt 2>error.txt

They will not capture graphical data. Are you trying to capture
graphical stuff?

No I just want to have all the stuff that is normally outputted to the
console in eclipse or into the dos window when it runs.
 
Back
Top