Unable to run _ByValue example

Srikanth srikanth.adayapalam at oracle.com
Mon Dec 28 05:00:56 UTC 2015


Hello Boaz,

This is a known issue - ATM, the VM does not yet handle the changes to 
signatures
that embed 'Q' in them to denote value types and it may be some time 
before the
VM support for this is fully there.

We are exploring some interim options to allow interested early access 
testers to
experiment with the usability aspects of the value type model (knowing 
that attendant
performance improvements are yet to come)

Stay tuned.
Thanks!
Srikanth

On Friday 25 December 2015 05:56 PM, Boaz Nahum wrote:
> (last pull valhalla today)
> Trying this:
>
> public final __ByValue class Point {
>      final int x;
>      final int y;
>      Point(int x, int y) {
>          this.x = x;
>          this.y = y;
>      }
>
>      public static void main(String[] args) {
>          Point p = __Make Point(5, 6);
>      }
> }
>
> (Compile file directly with bin/javac.exe not using IntelliJ)
>
> When trying to run:
>
> F:\Dev\JDKBuild\valhalla\build\windows-x86_64-normal-server-release\images\jdk\bin\java
> -cp F:\Dev\IntelliJProjectsOut\LearnJDK10\production\LearnJDK10
> by_val.Point
> java.lang.ClassFormatError: Method "<vminit>" in class by_val/Point
> has illegal signature "(II)Qby_val/Point;"
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:835)
> 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:184)
> 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:547)
> 	at java.net.URLClassLoader.access$100(URLClassLoader.java:87)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:413)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:397)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:396)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:262)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
> 	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:503)
> Error: A JNI error has occurred, please check your installation and try again
> Exception in thread "main"
> Process finished with exit code 1
>
> Thx
> Boaz




More information about the valhalla-dev mailing list