From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15120 invoked by alias); 30 Nov 2009 18:29:37 -0000 Received: (qmail 15111 invoked by uid 22791); 30 Nov 2009 18:29:36 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.nanometrics.ca (HELO mail.nanometrics.ca) (206.191.47.130) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Nov 2009 18:29:28 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.nanometrics.ca (Postfix) with ESMTP id 35BF8287586B; Mon, 30 Nov 2009 13:29:26 -0500 (EST) Received: from mail.nanometrics.ca ([127.0.0.1]) by localhost (mail.nanometrics.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IkrcGOMy77zi; Mon, 30 Nov 2009 13:29:25 -0500 (EST) Received: from [10.11.2.29] (beng-pc.nanometrics.ca [10.11.2.29]) by mail.nanometrics.ca (Postfix) with ESMTP id 6AF7F287572A; Mon, 30 Nov 2009 13:29:25 -0500 (EST) Message-ID: <4B140F05.2040004@nanometrics.ca> Date: Mon, 30 Nov 2009 18:29:00 -0000 From: Ben Gardiner User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Keith Boynton CC: java@gcc.gnu.org Subject: Re: java.lang.NoClassDefFoundError: java.text.DecimalFormat References: <4D9C110C42174F1D8C77A1E18D8F3EF3@Flaresnazzy> In-Reply-To: <4D9C110C42174F1D8C77A1E18D8F3EF3@Flaresnazzy> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 2009-11/txt/msg00084.txt.bz2 Keith Boynton wrote: > I have reached a problem I'm really struggling to resolve though. > > I'm successfully compiling my project and have managed to resolve > quite a few "NoClassDefFoundError"s, by various methods. > > However the fix for this one is really eluding me... > > Exception in thread "main" java.lang.NoClassDefFoundError: > java.text.DecimalFormat > at gnu.xml.transform.Stylesheet.initDefaultDecimalFormat This sounds very similar to the problem addressed in a previous thread: http://old.nabble.com/SimpleDateFormat-td18000139.html. Perhaps the solution is also similar: from that thread: > #copy libgcj to a working dir (could be in a different location than > /usr/lib/ for you) > mkdir -p /tmp/mess_with_libgcj > cd /tmp/mess_with_libgcj > cp /usr/lib/libgcj.a . > > #extract all the object from this library > ar x libgcj.a > > #make a lib with only the properties objects > ar rvcs libgcj_properties.a *properties*.o > #do the (sometimes superfluous) blessing of the lib > ranlib libgcj_properties.a > > #copy the lib to the system lib dir > cp libgcj_properties.a /usr/lib/ > > > #goto your source project and this time link-in those properties objects > with --whole-archive, this forces the linker to include them even if > they aren't statically referenced > cd > *gcj* -o -Wl,--whole-archive -lgcj_properties > -Wl,--no-whole-archive -static-libgcj --main= I hope this helps, Ben