This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gij and FileWriter
Marco Trudel-4 wrote:
>
> SkippyV wrote:
>> I haven't been able to make the gij interpretor work on FileWriter
>> (Java).
>> Has anyone else had success?
>> I'm using WinXP and have tried it in both Cygwin and MSYS/MinGW. The
>> versions of libgcj used are
>> 3.4.5 for MinGW and 3.4.4 for Cygwin.
>
> Well, these are very old versions. You should update to at least 4.3.
> You could:
> - Compile GCJ yourself: http://rmathew.com/articles/gcj/bldgcj.html
> - Use it from here*: http://jnc.mtsystems.ch
> - Use it from here: http://www.thisiscool.com/gcc_mingw.htm
>
> * These builds bring some additional features:
> - A GUI
> - Support for AWT/Swing (taken from a Sun JRE 1.4)
> - Native builds for Linux and Windows
> - Crosscompilers in both direction (Linux <-> Windows)
> - Partial classpath exclusion (for smaller binaries)
> - ...
> The drawback is that the versions compiling for Windows cost 39.90
> (otherwise you'll have a demo dialog). Linux is free of charge.
>
>
> Hope that helps
> Marco
>
>
>> I can build the exe with no problem using gcj but if I just build the
>> class
>> file (-C option) and run gij on it
>> then I get a ClassNotFound exception for FileWriter.
>> Skippy
>>
>> some sample code:
>>
>> import java.io.*;
>> import java.util.*;
>>
>> public class Test3 {
>> public static void main(String[] args) {
>> String jaString = new String("Stream Test THREE");
>> writeOutput(jaString);
>> }
>>
>> static void writeOutput(String str) {
>> try {
>> FileWriter fwOut = new FileWriter("test.txt");
>> BufferedWriter bwOut = new BufferedWriter(fwOut);
>> bwOut.write(str);
>> bwOut.close();
>> }
>> catch (IOException e) {
>> e.printStackTrace();
>> }
>> }
>> }
>>
>>
>
>
>
Thanks for the suggestions, Marco. I'll check them out. -Skippy
--
View this message in context: http://www.nabble.com/gij-and-FileWriter-tp16064258p16097575.html
Sent from the gcc - java mailing list archive at Nabble.com.