From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1592 invoked by alias); 30 Nov 2009 15:45:47 -0000 Received: (qmail 1573 invoked by uid 22791); 30 Nov 2009 15:45:45 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS 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; Mon, 30 Nov 2009 15:45:39 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAUFjUPL026850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Nov 2009 10:45:30 -0500 Received: from zebedee.pink (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAUFjSum015231; Mon, 30 Nov 2009 10:45:29 -0500 Message-ID: <4B13E895.2050202@redhat.com> Date: Mon, 30 Nov 2009 15:45:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.23 (X11/20090825) 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 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/msg00081.txt.bz2 Keith Boynton wrote: > I'm pretty new to GCJ, however I have been making good progress. I've > managed to resolve quite a few issues. > > 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 > > I have the following in my code to try and force linking... > > private static final Class class3 = java.text.DecimalFormat.class; > static { java.text.DecimalFormat.class.getName(); } > > I have a version of rt.jar that I know definitely contains > java/text/DecimalFormat.class that is being compiled. gcj will only use its own rt.jar. > I'm using the following flags: > -Wl,--allow-multiple-definition > -findirect-dispatch > > Can anyone give me a few pointers as to what I need to do to get this class > included in my binary? We will help you, but you must tell us which gcj release you're using and you really should provide a short (but complete, compilable) test case that shows the problem. Andrew.