This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
Re: gcj/350: Only one result with Helloworld program under cygwin and W98
- To: apbianco at cygnus dot com
- Subject: Re: gcj/350: Only one result with Helloworld program under cygwin and W98
- From: Jeff Sturm <jeff dot sturm at commerceone dot com>
- Date: 19 Sep 2000 21:16:00 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: Jeff Sturm <jeff dot sturm at commerceone dot com>
The following reply was made to PR gcj/350; it has been noted by GNATS.
From: Jeff Sturm <jeff.sturm@commerceone.com>
To: cormier@u-picardie.fr
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/350: Only one result with Helloworld program under cygwin and
W98
Date: Tue, 19 Sep 2000 17:21:55 -0400
cormier@u-picardie.fr wrote:
> $ cat Hello.java
> public class Hello{
> public static void main(String[] args){
> System.out.println("Hello \n");
> }
> }
System.out is currently broken for Win32. There is a fairly old patch if you
are interested in the details... though it might not help if you are building
libgcj today:
http://sources.redhat.com/ml/java-patches/2000-q2/msg00056.html
> $ ./hello
> // Nothing is printed !!!!!!!!!!!!!!!!!!!!
That's what I expected. You can work around it by assigning System.out
explicitly before you use it:
try {
System.setOut(new PrintStream(new FileOutputStream("CONOUT$")));
} catch (Throwable t) {}
System.out.println("Hello!");
--
Jeff Sturm
jeff.sturm@commerceone.com