MessageBundle ???

Andrew Haley aph@redhat.com
Fri Apr 1 14:57:00 GMT 2011


On 04/01/2011 03:22 PM, dj_def@webmail.it wrote:
> 1)
> There is this test that is working under gcc 4.3.0 compiled by me with
> ecj1.exe created under ubuntu linux 11.04 (with i686-pc-mingw32-gcj
> cross compiler).
> This same test is not working with thisiscool gcc 4.3.0 (eclipse):
> import java.util.*;
> import java.util.regex.*;
> public class Test {
>   static public void  main (String[] argv) {
>     String s = new String("hom hom");
>     String t = new String("om");
>     String u = s.replaceAll(t, "i Jack!");
>     System.out.println(u);
>   }
> }

Sorry, I have no idea what this is.

------------->gives: java.lang.NumberFormatException: invalid character
> at position 1 g$ò< ...
> 
> 
> 2)
> This other test is not working with both the versions.
> 
> class Test {
> 
>    public static void main(String argv[]) {
> 
>        System.out.printf("%09.3f%n",3.1415926535);
>    }
> }
> 
> -------------> gives a: Exception in thread "main"
> java.lang.NumberFormatException: invalid character at position 2 in 09

That's just a bug: leading zeroes in format fields aren't being handled
correctly.  The "09" is being parsed as an octal number because it begins
with a zero.

> 3)
> This last test works with thisiscool gcc and not with the gcc I
> compiled:
> 
> import java.net.MalformedURLException;
> import java.net.URL;
> import java.net.URLConnection;
> 
> public class LastTest {
>   public static void main(String args[]) {
>     try {
>       URL url = new URL("http://www.google.it");
>       url.openConnection();
>     }
>     catch(Exception e) {
>       System.out.println("exception");
>     }
>   }
> }

This will be another missing resource, I expect.

Here's the actual exception

>    at
> java.util.Currency.<clinit>(/extra/wgcc/sys-root/i686-pc-mingw32/libjava/j
> ava/util/Currency.java:136)
>    at
> java.lang.Class.initializeClass(/extra/src/gcc-4.3.0/libjava/gcj/cni.h:99)

Look at Currency.java:136

        properties.load(Currency.class.getResourceAsStream("iso4217.properties"));

So you need to link iso4217.properties.o

Andrew.



More information about the Java mailing list