Is this error known?
Rémi Forax
forax at univ-mlv.fr
Thu Jul 23 05:09:26 PDT 2009
Raffaello Giulietti a écrit :
> 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
>
>
Sorry for not answering before, It's a known bug and it's already fixed in
the mlvm workspace.
Threre is a known workaround, put your class (Main.class) in the
boostrap classpath
(with -Xbootclasspath/p:path_to_Main_dot_class).
cheers,
Rémi
>
>
> 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;
>> }
>>
>> }
>>
>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>
More information about the mlvm-dev
mailing list