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 09:57:00 -0000	[thread overview]
Message-ID: <4D95A194.3020701@redhat.com> (raw)
In-Reply-To: <1301647887.2654.9.camel@linux-pc>

On 04/01/2011 09:51 AM, dj_def@webmail.it wrote:
> I have problems with all java programs containing regex and string
> functions like split() or replace()/replaceAll().
> This programs will compile and run correctly on linux but will compile
> and crash on windows; the output says something about a missing resource
> (MessageBundle). I tried many things to get around of this but I did not
> find any solution.
> I would like to better understand why this happens but the most
> important thing would be to find a solution.
> I use this class as an example:
> 
> import java.util.regex.Pattern;
> class FFooClass {
>   public static void main(String args[]) {
>     Pattern p = Pattern.compile("bye");
>     System.out.println("bye");
>   }
> }
> 
> I do:
> gcj --main FFoo.java -o FFoo
> on linux and it works!
> I do:
> gcj --main FFoo.java -o FFoo.exe
> on windows (or even with a cross compiler for linux) and the app
> FFoo.exe doesn't work!
> Starting from this class, what are the steps to get a working exe?

The problem here is that the linker doesn't know that a MessagesBundle
is required.  The core cause of all this is that dynamic linking still
doesn't work for gcj on Linux.

You need to link explicitly on the command line with the MessagesBundle
files.  Look for something like

   gnu/java/util/regex/MessagesBundle.properties.o

in the libcgj build dir.

Andrew.

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01  8:51 dj_def
2011-04-01  9:57 ` Andrew Haley [this message]
2011-04-01 10:09   ` Andrew Haley
2011-04-01 14:22 dj_def
2011-04-01 14:57 ` Andrew Haley
2011-04-01 17:43   ` Andrew Haley
2011-04-01 19:32     ` Mark Wielaard
2011-04-04  9:38       ` Andrew Haley
2011-04-04 12:00 dj_def
2011-04-04 12:13 ` Andrew Haley
2011-04-04 13:04 dj_def
2011-04-04 13: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=4D95A194.3020701@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).