4

I'm looking for a browser that uses the Nashorn engine (article) instead of SpiderMonkey or V8, etc. Do any browsers use this engine yet?

  • There probably isn't one, since it's not intended to be run in a browser. – Flimzy Apr 24 '15 at 15:23
2

Sort of

In gngr we are using rhino as the engine. Rhino is a close cousin of Nashorn. If you only need Nashorn, it might be conceivable to switch the engines with some effort.

The reason we are using Rhino is:

  • We don't yet have the resources to port to Nashorn.
  • We might want to support Java 7 in the future.
  • Having the JS engine as a separate Jar helps sandboxing it. (If Nashorn is loaded by the system class loader, as I suspect it is, it won't be possible to sandbox it).
  • Nashorn seems to add some bindings to the global scope with no way to turn it off. (This is from vague memory; I had brought this up on the Nashorn mailing list about an year back and was told that this behavior won't be changed).
  • You have lots of questions :) Thanks for looking into it. Would be happy to answer. On IRC we are at #gngr on freenode, and /r/gngr on Reddit. Reddit would be best for this discussion. – HRJ Aug 12 '15 at 20:33
0

Not Likely

While there could conceivably be a web browser using Nashorn as its JavaScript/ECMAScript engine, that is not likely. Such usage is not the purpose of Nashorn.

Instead, Nashorn is aimed at these two purposes:

  • Embedding JavaScript within a Java app.
    Sometimes a Java app wants to run some code or library written in JavaScript.
  • Develop standalone JavaScript apps to run on the Java Virtual Machine (JVM).
  • 1
    But what if there is a java app which is also a browser :) See my answer. – HRJ Aug 5 '15 at 3:44
0

Web-K is a basic web view which integrates Flying Saucer as a renderer, JSoup as parser and Nashorn as JS runtime with basic DOM-related features.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.