From mboxrd@z Thu Jan 1 00:00:00 1970 From: cormier@u-picardie.fr To: java-gnats@sourceware.cygnus.com Subject: java/1378: Only one result with Helloworld program under cygwin and W98 Date: Wed, 20 Dec 2000 12:25:00 -0000 Message-id: <20000919201202.655.qmail@sourceware.cygnus.com> X-SW-Source: 2000-q4/msg01154.html List-Id: >Number: 1378 >Category: java >Synopsis: Only one result with Helloworld program under cygwin and W98 >Confidential: no >Severity: serious >Priority: low >Responsible: apbianco >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Dec 20 12:19:27 PST 2000 >Closed-Date: >Last-Modified: Sat Sep 23 09:00:00 PDT 2000 >Originator: cormier@u-picardie.fr >Release: unknown-1.0 >Organization: >Environment: W98, cygwin and gcj >Description: Loading last version of Cygwin on W98 Loading all http://www.cs.bris.ac.uk/~jb7216/libgcj/ standard@OEMCOMPUTER ~ $ cat Hello.java public class Hello{ public static void main(String[] args){ System.out.println("Hello \n"); } } standard@OEMCOMPUTER ~ $ gcj --main=Hello -o Hello Hello.java standard@OEMCOMPUTER ~ $ ./hello // Nothing is printed !!!!!!!!!!!!!!!!!!!! In fact the program runs ONLY ONCE after booting PC and running cygwin, with or without others commands before : Boot PC Run cygwin ./hello hello ./hello // Nothing is printed ./hello // Nothing always Boot PC Run cygwin ls Hello.exe Hello.java~ bonjour.c~ cygwin1.dll Hello.java bonjour.c bonjour.exe strace.txt ./hello hello ./hello // Nothing always . I have the same result with another PC (a laptop). >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: Formerly PR gcj/350 From: Jeff Sturm 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 From: Bryce McKinlay To: Jeff Sturm Cc: java-gnats@sourceware.cygnus.com Subject: Re: gcj/350: Only one result with Helloworld program under cygwin and W98 Date: Wed, 20 Sep 2000 10:25:42 +1200 Jeff Sturm wrote: > 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 Jeff, Was there a reason why this patch never went in? Or was it just forgotten? regards [ bryce ] From: Tom Tromey 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: Sat, 23 Sep 2000 08:53:20 -0700 (PDT) >>>>> ">" == cormier writes: >> In fact the program runs ONLY ONCE after booting PC and running >> cygwin, with or without others commands before : Unfortunately you're a bit on your own with this problem. None of the main developers is currently using cygwin. So in the short term you'd really have to debug this yourself. We'd like to fix it, but it might be a long time before we get to it. Tom >Unformatted: