question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nashorn support (Java 8)

See original GitHub issue

Java 8 includes a new javascript engine, Nashorn that provides a massive performance improvement over Rhino. Nashorn’s Java interop is sufficiently different from Rhino that the existing Rhino versions don’t work in Nashorn, even in Nashorn’s Rhino interop mode.

It would be good to have a separate build similar to less-rhino, e.g. less-nashorn that provides the bindings required with work in the nashorn engine. This would support lessc integration into Java-based build tools.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:23 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
artfiedlercommented, Nov 7, 2016

I don’t know about the browserify workarounds etc mentioned here… but I put together a nashorn implementation. At this moment here are the stats… running this on windows 10, jdk1.8.0_102… I didn’t test on Linux yet but it should be working. Is there still interest in this?

c:…\less.js-2.7.1\bin>jjs lessjjsc – …\benchmark\benchmark.less Finished: 6185.745009ms I don’t have node installed so I don’t know how fast this runs on node, can someone post some timings? I’m measuring from just before less.render and first line in .then()

c:…\less.js-2.7.1\test\nashorn>jjs index.js – 13 Failed, 147 passed I believe some of the failed tests actually pass just the output doesn’t match, and a few minor tweaks might make a few more tests run successfully. Right now I know svg image size and source maps aren’t implemented so those tests fail

(I have not posted code or made a pull request yet, FYI)

0reactions
stale[bot]commented, Nov 14, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java 8 - Nashorn JavaScript
With Java 8, Nashorn, a much improved javascript engine is introduced, to replace the existing Rhino. Nashorn provides 2 to 10 times better...
Read more >
Oracle Nashorn: A Next-Generation JavaScript Engine for ...
Java SE 8 will instead ship with a new engine called Oracle Nashorn, which is based on JSR 292 and invokedynamic . It...
Read more >
Nashorn JavaScript Engine in Java with Examples
Nashorn is introduced in JDK 8 to replace existing JavaScript engine i.e. Rhino. Nashorn is far better than Rhino in term of performance....
Read more >
Introduction to Nashorn
This article is focused on Nashorn – the new default JavaScript engine for the JVM as of Java 8. Many sophisticated techniques have...
Read more >
Java 8 Nashorn Tutorial
Nashorn supports the invocation of javascript functions defined in your script files directly from java code. You can pass java objects as ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found