problems getting an invoke dynamic sample compiled & running
Alexandru Nedelcu
alex at lexoft.eu
Sat Nov 28 01:03:22 PST 2009
Hi,
I'm trying to compile the following code which uses MethodHandles:
http://pastebin.com/m67d84d3c
The compilation I did with ...
/opt/java/jdk1.7.0/bin/javac -d bin/ src/Main.java
When running it with no extra-params ...
JSR 292 method handles are disabled in this JVM.
Use -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles to
enable.
When adding the suggested options ...
* JSR 292 method handle code is mismatched to this JVM. Disabling
support.
* Exception in thread "main" java.lang.NoSuchMethodError:
java.dyn.MethodHandle.invoke(Ljava/lang/String;)V
When adding -XX:+EnableInvokeDynamic the code runs, but I'm still
getting this warning, which is not good I suppose ...
* JSR 292 method handle code is mismatched to this JVM. Disabling
support.
Do you guys know of any document for getting this thing up and running?
Thanks,
--
Alexandru Nedelcu
More information about the jdk7-dev
mailing list