Opened 4 years ago

Closed 21 months ago

#64 closed defect (fixed)

Java.exe outputs to stderr

Reported by: yoda Owned by:
Priority: blocker Milestone: GA4
Component: general Version: 1.6.0-b19 Beta 2
Severity: highest Keywords:
Cc:

Description

Seems like all output from running java.exe from CMD goes to stderr.
All OS/2 apps have always sent output to stdout, and that is what
all OS/2 tools expect.

Previous Java versions did the same !

EX:

(I want to know how to use Java:)

Java.exe -? | more

...everything scrolls out of screen ... :-(

We need Java6 to have OS/2 personality,
as all other OS/2 apps - and all previous JAVA versions.

Change History (8)

comment:1 Changed 3 years ago by dmik

  • Milestone changed from Enhanced to GA2
  • Severity set to medium

comment:2 Changed 2 years ago by diver

  • Milestone changed from Next to GA3

comment:3 Changed 2 years ago by diver

  • Milestone changed from GA3 to GA4

this is not really a showstoper, but we will decide for GA4 if we do that or not.

comment:4 Changed 21 months ago by diver

  • Priority changed from minor to major
  • Severity changed from medium to highest

comment:5 Changed 21 months ago by diver

  • Priority changed from major to blocker

i marked it as a blocker, because we finaly should decide if we change that at all.

comment:6 Changed 21 months ago by dmik

I see that the MacOS build of Java prints the help screen (-?) to stdout instead of stderr (everything else, e.g. -version, seems to be printed to stderr). This must be a custom Mac patch (since the OpenJDK code always prints the help screen to stderr). I this convinces me to do the same on OS/2.

comment:7 Changed 21 months ago by dmik

Done in r407.

Note that you won't be able to use the standard MORE command anyway as it is bogus -- it won't translate \n on input to \n\r on output so you will get shifted lines. This is NOT a bug of Java (or of its OS/2 build) since Java doesn't perform this translation by default (even on Windows).

Note also that GoldenCode? Java 1.4.1 seems to do the same hack (only for the -? option too). But there it doesn't work properly: any redirection of java -? to a file or piping it to e.g. more just suppresses all output at all. Looks like a bug in GoldenCode? Java.

comment:8 Changed 21 months ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.