java.lang.NoClassDefFoundError: java.text.DecimalFormat

Keith Boynton keithboynton@flaredesign.co.uk
Mon Nov 30 15:39:00 GMT 2009


Hi folks,

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.

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?


Thanks in advance

Keith 



More information about the Java mailing list