Re: MessageBundle ???

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
On 04/01/2011 09:51 AM, [email protected] 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.