This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcj does not print (PrintWriter, OutputStreamWriter)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]