Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've done some more digging around and you can get Nashorn working with JDK7 by using a backport of it located here:</p> <p><a href="https://bitbucket.org/ramonza/nashorn-backport">https://bitbucket.org/ramonza/nashorn-backport</a></p> <p>Checkout that repository and attempt to build it using <code>ant -f make/build.xml</code> as described on the BitBucket page</p> <p>Apply the patch listed in the issues section <a href="https://bitbucket.org/ramonza/nashorn-backport/issue/1/update-to-dynalink-05">here</a> if you get a failed build due to dynalink (I assume it will be patched into the main repository soon by the developer).</p> <p>Upon building it you should get a nashorn.jar file inside the dist folder of your cloned repository.</p> <p>Now you need to add this jar to your bootclasspath using a VM option similar to this:</p> <p><code>-Xbootclasspath/a:C:/nashorn-backport/dist/nashorn.jar</code></p> <p>And now you should be able to use nashorn. To make sure here's a quick test program I wrote that will list out the available engine factories:</p> <pre><code>import javax.script.*; public class NashornTest { public static void main(String args[]) { ScriptEngineManager manager = new ScriptEngineManager(); for (ScriptEngineFactory f : manager.getEngineFactories()) { printBasicInfo(f); System.out.println(); } } public static void printBasicInfo(ScriptEngineFactory factory) { System.out.println("engine name=" + factory.getEngineName()); System.out.println("engine version=" + factory.getEngineVersion()); System.out.println("language name=" + factory.getLanguageName()); System.out.println("extensions=" + factory.getExtensions()); System.out.println("language version=" + factory.getLanguageVersion()); System.out.println("names=" + factory.getNames()); System.out.println("mime types=" + factory.getMimeTypes()); } } </code></pre> <p>Running that with the bootclasspath set will list Rhino and Nashorn, without it you will only see Rhino.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload