This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: java.lang.NoClassDefFoundError: java.text.DecimalFormat
- From: Andrew Haley <aph at redhat dot com>
- To: Keith Boynton <keithboynton at flaredesign dot co dot uk>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 30 Nov 2009 15:45:25 +0000
- Subject: Re: java.lang.NoClassDefFoundError: java.text.DecimalFormat
- References: <4D9C110C42174F1D8C77A1E18D8F3EF3@Flaresnazzy>
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.