From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20997 invoked by alias); 1 Apr 2011 09:57:52 -0000 Received: (qmail 20987 invoked by uid 22791); 1 Apr 2011 09:57:50 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_CG,TW_GC,T_RP_MATCHES_RCVD,WEBMAIL_BODY X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Apr 2011 09:57:42 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p319vg9k016851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 1 Apr 2011 05:57:42 -0400 Received: from zebedee.pink (ovpn-113-109.phx2.redhat.com [10.3.113.109]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p319vfuL008067; Fri, 1 Apr 2011 05:57:41 -0400 Message-ID: <4D95A194.3020701@redhat.com> Date: Fri, 01 Apr 2011 09:57:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: java@gcc.gnu.org Subject: Re: MessageBundle ??? References: <1301647887.2654.9.camel@linux-pc> In-Reply-To: <1301647887.2654.9.camel@linux-pc> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00005.txt.bz2 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.