public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ben Gardiner <BenGardiner@nanometrics.ca>
To: Keith Boynton <keithboynton@flaredesign.co.uk>
Cc: java@gcc.gnu.org
Subject: Re: java.lang.NoClassDefFoundError: java.text.DecimalFormat
Date: Mon, 30 Nov 2009 18:29:00 -0000	[thread overview]
Message-ID: <4B140F05.2040004@nanometrics.ca> (raw)
In-Reply-To: <4D9C110C42174F1D8C77A1E18D8F3EF3@Flaresnazzy>

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 <your source build-tree>
> *gcj* -o <your prog> -Wl,--whole-archive -lgcj_properties
> -Wl,--no-whole-archive -static-libgcj --main=<your main> 
I hope this helps,
Ben

  parent reply	other threads:[~2009-11-30 18:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 15:39 Keith Boynton
2009-11-30 15:45 ` Andrew Haley
2009-11-30 21:13   ` Keith Boynton
2009-11-30 21:15     ` Ben Gardiner
2009-12-04  8:34       ` Keith Boynton
2009-12-04  9:47         ` Andrew Haley
2009-12-04 18:12           ` Keith Boynton
2009-11-30 18:29 ` Ben Gardiner [this message]
2009-11-30 18:33   ` Andrew Haley
2009-11-30 21:13     ` Keith Boynton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B140F05.2040004@nanometrics.ca \
    --to=bengardiner@nanometrics.ca \
    --cc=java@gcc.gnu.org \
    --cc=keithboynton@flaredesign.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).