public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Oliver Kullmann <O.Kullmann@swansea.ac.uk>
To: gcc-help@gcc.gnu.org
Subject: gcj does not print (PrintWriter, OutputStreamWriter)
Date: Sun, 27 Nov 2011 03:33:00 -0000	[thread overview]
Message-ID: <20111126143010.GA13767@cs-wsok.swan.ac.uk> (raw)

Hello,

we use

> gcj --version
gcj (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]

I have a simple collection of java-files, constituting a program
"GeneralisedTicTacToe". Compiling the .java-files with "gcj -C"
to .class-files, and then running "java GeneralisedTicTacToe"
it all works, where we use

> java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.4) (suse-0.3.2-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

However, when attempting, via "gcj --main=GeneralisedTicTacToe *.class",
to create a binary via gcj, we don't get error messages, but
the resulting binary does not work properly: it has problems with
output to standard output as well as input from standard input.

The problem with standard output is easier to describe: It just
prints nothing, when calling
out.printf(format, args);
where
out = new PrintWriter(new OutputStreamWriter(System.out, charsetName), true);
using
import java.io.PrintWriter;
import java.io.OutputStreamWriter;

I didn't find such problems in the Internet nor on gcj's FAQ.

Thanks for your consideration.

Oliver

             reply	other threads:[~2011-11-26 14:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-27  3:33 Oliver Kullmann [this message]
2011-11-28 17:51 ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111126143010.GA13767@cs-wsok.swan.ac.uk \
    --to=o.kullmann@swansea.ac.uk \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).