Is this error known?
Raffaello Giulietti
raffaello.giulietti at gmail.com
Thu Jul 23 05:03:06 PDT 2009
Sorry if I insist.
Can anybody try the code on a jvm built from the sources? Before I start
gathering all the pieces together to build my own jvm, I would like to
know if it is worth doing by being ensured that the code is correct and
that the binary snapshot I'm using is the real cause of the crash.
I guess it is one minute work to compile and run the code.
Thank you in advance
Raffaello Giulietti wrote:
> Hello,
>
> any idea why the following app crashes with NoClassDefFoundError?
>
>
>
> I'm on:
> * Vista/SP2
> * binary snapshot b65
> * compiling with -XDinvokedynamic -target 7
> * running with -Xint -XX:+EnableInvokeDynamic
>
>
>
> The output:
>
> inside bootstrapper
> hello(String)
> Exception in thread "main" java.lang.NoClassDefFoundError: Main
> at Main.main(Main.java:11)
>
>
> ----
>
> import java.dyn.CallSite;
> import java.dyn.InvokeDynamic;
> import java.dyn.Linkage;
> import java.dyn.MethodHandles;
> import java.dyn.MethodType;
>
> public class Main {
>
> public static void main(String[] args) {
> InvokeDynamic.<void>anyName(new String());
> InvokeDynamic.<void>anyName(new Main());
> }
>
> public static void hello(String v) {
> System.out.println("hello(String)");
> }
>
> public static void hello(Main v) {
> System.out.println("hello(Main)");
> }
>
> static {
> Linkage.registerBootstrapMethod("bootstrapDynamic");
> }
>
> private static CallSite bootstrapDynamic(java.lang.Class<?> clazz,
> String name, MethodType type) {
> System.out.println("inside bootstrapper");
> CallSite site = new CallSite(clazz, name, type);
> site.setTarget(MethodHandles.lookup().findStatic(clazz, "hello",
> type));
> return site;
> }
>
> }
More information about the mlvm-dev
mailing list