Oracle Proposes New Native JavaScript Engine for OpenJDK
hypnosec writes "Oracle has proposed a new project for OpenJDK — Nashorn, which aims to implement a high-performance yet lightweight JavaScript runtime that would run on the JVM natively. Nashorn will be headed by Jim Laskey, multi-language Lead at Oracle and the project will be sponsored by HotSpot group. The project proposes an implementation of JavaScript such that it can run standalone JavaScript applications via the JSR 223 APIs. Nashorn's design will enable it to take advantage of new JVM technologies like the MethodHandles and the InvokeDynamic APIs."
Now this will just make describing the differences between java and javascript even more painful . . . :P
I read TFA and all I got was this lousy cookie
There have also been standalone javascript engines running on the JVM; the best-developed is Rhino from Mozilla.
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
This was first discussed in July 2011 at the JVM Language Summit (PDF) link. It was discussed at the most recent JavaOne, and there have been more than a few articles about it.
What do you know I wrote a novel
Thought people should know
Nashorn is German for Rhinocerus .. So we wonder is this just another Rhino fork??
I'm sure that this won't make lay-person misunderstandings of the difference between Java and Javascript worse at all! At all! AT ALL!
The CB App. What's your 20?
I have used Javascipt as the language of configuration files in a Java application. It replaced XML. It is a pleasure to work with Javascript for this purpose, much more comfortable than XML. I also considered YAML, but Javascript is more powerful and considering its ubiquity it does not need more learning.
However, I am not sure if real administrators would like Javascript in configuration files. At least it is standard, and has a good documentation, but the expressiveness of Javascript can be used in the wrong way too.
"highly dynamic"? Not sure what you mean by that. I've been writing highly optimized code for years without ever having to use 'eval'.
As the actual proposal notes, while Project Nashorn has been in the works within Oracle for some time, what they're doing now is proposing to make it part of OpenJDK, to get more people working on it so that the code can be tightened up for production use.
Breakfast served all day!
There's already a javascript interpreter from mozilla bundled with every JRE, so there must be some demand.
General purpose? I dunno. Sun were enthusiastic about JRuby (an original motivation for invokeDynamic) for a while but Oracle dumped the development team like a hot potato.
As for the business case, think node.js in the cloud hosted on, say, Oracle Weblogic.
Rhino has been a part of the default Java distro since long before v8.
What I'd like to know is, how does this thing improve on Rhino? And can parts of it be reused in scripting engines for other languages? The article is pretty light on details.
Since JDK 6, the open source Mozilla Rhino Javascript engine is already built-in
Take-off every
So... pretty far, then?
File under 'M' for 'Manic ranting'
Node.js uses Google's V8 Javascript engine which is too fast for some applications. Also, it doesn't use enough memory, a problem the JVM is likely to correct. You can't expect much from an app that fails to allocate 900MB of virtual space and an 60MB working set on start-up.
Lurking at the bottom of the gravity well, getting old