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: MessageBundle ???


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.


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