Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 157028

Summary: Accessible paradigm to test the behavior of java commands relative to System.in, out, err redirection using shell notation
Product: [Eclipse Project] JDT Reporter: Maxime Daniel <maxime_daniel>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Maxime Daniel CLA 2006-09-12 09:31:30 EDT
Version: 3.3.0
Build id: I20060905-1250

I may have missed something, but I found no way to translate in the launcher the following command:

java Main < input.txt > output.txt 2> error.txt

I believe I only managed to identify the parameters to get the equivalent for:

java Main > output.txt
and
java Main >> output.txt

While it is not a real problem to drop down to a shell and run java directly on one class when this is needed, I miss the function when things become more tricky.
Comment 1 Darin Wright CLA 2006-09-12 09:46:23 EDT
You can multiplex the output of a process using the "Common Tab" of a launch config - to a file or console or both. However, we don't implement this via system redirection commands. We might want to consider using the standard redirection commands if it works on all platforms.

*** This bug has been marked as a duplicate of 155411 ***
Comment 2 Maxime Daniel CLA 2006-09-12 10:06:10 EDT
Darin, thanks for the pointer. I reached the same conclusions. Would love to have angle brackets in the parameters... even if it is not parameters per se. Note that the separation of System.err from System.out is needed too.

Bug 155411 is a duplicate re. System.in. Missed it when searching (did not use the stdin keyword...), apologies for that.

Seen another one that specifically asked for three consoles (in, out, err) per run (closed as WONTFIX). But it would be less important to me (after all, the standard behavior of console based programs is to mix the three streams in the same console, unless some are redirected, most often to/from files or pipes).

I'll add a comment to bug 155411 to ask for stderr separation.