This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Re: byte array to string conversion


Tom Tromey wrote:

"Lars" == Lars Andersen <lars@rimfaxe.com> writes:



Lars> I made a little test program, maybe someone can tell what's going on. Lars> With Sun jdk 1.4.1 on linux it outputs "toAsciiString -> Test String" Lars> With GCJ 3.3 on linux it outputs "toAsciiString -> "

Hmm, for me, both 3.3 and current cvs head work correctly.
How did you compile this program?  I tried compiling to an executable
with and without -O, and also gij with bytecode.

Tom



Just tried it with the latest 3.4 snapshot. Same thing.


I tried it with -static just because, and got this :

./a.out

Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass() (../../../gcc-3.4-20030910/libjava/java/lang/natClass.cc:849)
at TestStringConversion.main(java.lang.String[]) (Unknown Source)
Caused by: java.io.CharConversionException
at gnu.gcj.convert.Input_iconv.read(char[], int, int) (../../../gcc-3.4-20030910/libjava/gnu/gcj/convert/natIconv.cc:99)
at java.lang.String.init(byte[], int, int, java.lang.String) (../../../gcc-3.4-20030910/libjava/java/lang/natString.cc:508)
at java.lang.String.String(byte[], int, int) (../../../gcc-3.4-20030910/libjava/java/lang/String.java:359)
at TestStringConversion.__U3c_clinit__U3e_() (Unknown Source)
at java.lang.Class.initializeClass() (../../../gcc-3.4-20030910/libjava/java/lang/natClass.cc:863)
...1 more



/Lars Andersen



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