Working around NoClassDefFound
Rémi Forax
forax at univ-mlv.fr
Wed Jul 4 02:02:00 PDT 2012
On 07/04/2012 03:01 AM, Mark Roos wrote:
> From Charlie
>
> It also doesn't appear to happen with JRuby on the boot
> classpath...it happens only when JRuby is loaded in a child
> classloader.
>
> That was my experience as well. The only way I found to avoid it was to
> put my code into the bootClassPath. I messed with other ideas ( but not
> Rémi's) but the error always eventually returned.
>
> regards
> mark
There is only one workaround to avoid the NoClassDefFound error as far
as I know,
the signature of all invokedynamic calls must not contain any class
which is not in the bootclasspath.
So either you put the runtime classes in the bootclasspath or you erase
all your signature to only use
primitive types and Object.
cheers,
Rémi
More information about the mlvm-dev
mailing list