exception running JDK 8 test program
Venkatachalam, Vasanth
Vasanth.Venkatachalam at amd.com
Thu Feb 14 12:48:47 PST 2013
Hi,
When running the following JDK8 program (which has a lambda expression) in Graal, the VM throws the below exception and exits.
We know that Graal doesn't yet support the compilation of lambda constructs, but we would have expected the execution to have fallen back to the Hotspot compiler/interpreter instead of simply failing.
Any workarounds for this?
public class Twelve{
interface SAM{
void run(int _id);
}
public static void For(int _count, SAM _sam){
for (int id = 0; id<_count; id++){
_sam.run(id);
}
}
public static void main(String[] _args) {
For(12, value ->{System.out.printf("%d * %d = %d\n", value, 12, (value*12));});
}
}
Exception in thread "main" java.lang.ClassFormatError: This JVM does not support constant tag 18 in class file com/amd/aparapi/sample/mandel/Main
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:491)
More information about the graal-dev
mailing list