I am going to cover some of the interesting or odd projects that are being targeted to run on JVM that I came across recently in this post blog.
Nashorn:
Nashorn is an upcoming JavaScript engine, developed fully in Java 8 Language by Oracle. And open sourced to OpenJDK as part of jdk8. It also validates the InvokeDynamic (JSR-292) feature in JDK 7; leverage all new language and JVM features in JDK 8.
We know the existing JVM (from JDK 1.1 onwards) ships with a JavaScript engine, which is called Rhino. But the recent version of Rhino has only been tested with JDK 1.4 and grater. I don’t know who in the world is using JDK 1.4 anyway.
So what is need for the new project?
Rhino is an old code base and developed by using old JDK. And Nashorn significantly outperforms Rhino, it may not beat Google’s V8. And Nashorn implements a new meta-object protocol that simplifies calling Java APIs from JavaScript and enables seamless interactions between JavaScript and Java. And all the JVM TI based tools such as debugging and profiling can read meta-object protocol.
But the real motivation for writing a new engine to validate InvokeDynamic feature, which formally opened the door to support non-Java languages on JVM.
Nashorn engine passes ECMAScript 5.1 compliance tests. You can follow Oracle’s blog for the updated info. It is an interesting project to checkout.