public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: java@gcc.gnu.org
Subject: Re: MessageBundle ???
Date: Fri, 01 Apr 2011 14:57:00 -0000	[thread overview]
Message-ID: <4D95E7BB.4020409@redhat.com> (raw)
In-Reply-To: <1301667745.1724.2.camel@linux-pc>

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.

  reply	other threads:[~2011-04-01 14:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01 14:22 dj_def
2011-04-01 14:57 ` Andrew Haley [this message]
2011-04-01 17:43   ` Andrew Haley
2011-04-01 19:32     ` Mark Wielaard
2011-04-04  9:38       ` Andrew Haley
  -- strict thread matches above, loose matches on Subject: below --
2011-04-04 13:04 dj_def
2011-04-04 13:09 ` Andrew Haley
2011-04-04 12:00 dj_def
2011-04-04 12:13 ` Andrew Haley
2011-04-01  8:51 dj_def
2011-04-01  9:57 ` Andrew Haley
2011-04-01 10:09   ` 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=4D95E7BB.4020409@redhat.com \
    --to=aph@redhat.com \
    --cc=java@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).