1 - What is Nashorn? 2 3 Nashorn is a runtime environment for programs written in ECMAScript 5.1 4 that runs on top of JVM. 5 6 - How to find out more about ECMAScript 5.1? 7 8 The specification can be found at 9 10 http://www.ecma-international.org/publications/standards/Ecma-262.htm 11 12 - How to checkout sources of Nashorn project? 13 14 Nashorn project uses Mercurial source code control system. You can 15 download Mercurial from http://mercurial.selenic.com/wiki/Download 16 17 Information about the forest extension can be found at 18 19 http://mercurial.selenic.com/wiki/ForestExtension 20 21 and downlaoded using 22 23 hg clone https://bitbucket.org/gxti/hgforest 24 25 You can clone Nashorn Mercurial forest using this command: 26 27 hg fclone http://hg.openjdk.java.net/nashorn/jdk9 nashorn~jdk9 28 29 To update your copy of the forest (fwith the latest code: 30 31 (cd nashorn~jdk9 ; hg fpull) 32 33 Or just the nashorn subdirectory with 34 35 (cd nashorn~jdk9/nashorn ; hg pull -u) 36 37 To learn about Mercurial in detail, please visit http://hgbook.red-bean.com. 38 39 - How to build? 40 41 To build Nashorn, you need to install JDK 9. You may use the Nashorn 42 forest build (recommended) or down load from java.net. You will need to 43 set JAVA_HOME environmental variable to point to your JDK installation 44 directory. 45 46 cd nashorn~jdk9/nashorn/make 47 ant clean; ant 48 49 - How to run? 50 51 Use the jjs script (see RELESE_README): 52 53 cd nashorn~jdk9/nashorn 54 sh bin/jjs <your .js file> 55 56 Nashorn supports javax.script API. It is possible to drop nashorn.jar in 57 class path and request for "nashorn" script engine from 58 javax.script.ScriptEngineManager. 59 60 Look for samples under the directory test/src/jdk/nashorn/api/scripting/. 61 62 - Documentation | 1 - What is Nashorn? 2 3 Nashorn is a runtime environment for programs written in ECMAScript 5.1 4 that runs on top of JVM. 5 6 - How to find out more about ECMAScript 5.1? 7 8 The specification can be found at 9 10 http://www.ecma-international.org/publications/standards/Ecma-262.htm 11 12 - How to checkout sources of Nashorn project? 13 14 Nashorn project uses Mercurial source code control system. You can 15 download Mercurial from http://mercurial.selenic.com/wiki/Download 16 17 Information about the forest extension can be found at 18 19 http://mercurial.selenic.com/wiki/ForestExtension 20 21 and downloaded using 22 23 hg clone https://bitbucket.org/gxti/hgforest 24 25 You can clone Nashorn Mercurial forest using this command: 26 27 hg fclone http://hg.openjdk.java.net/nashorn/jdk9 nashorn~jdk9 28 29 To update your copy of the forest (fwith the latest code: 30 31 (cd nashorn~jdk9 ; hg fpull) 32 33 Or just the nashorn subdirectory with 34 35 (cd nashorn~jdk9/nashorn ; hg pull -u) 36 37 To learn about Mercurial in detail, please visit http://hgbook.red-bean.com. 38 39 - How to build? 40 41 To build Nashorn, you need to install JDK 9. You may use the Nashorn 42 forest build (recommended) or download from java.net. You will need to 43 set JAVA_HOME environmental variable to point to your JDK installation 44 directory. 45 46 cd nashorn~jdk9/nashorn/make 47 ant clean; ant 48 49 - How to run? 50 51 Use the jjs script (see RELESE_README): 52 53 cd nashorn~jdk9/nashorn 54 sh bin/jjs <your .js file> 55 56 Nashorn supports javax.script API. It is possible to drop nashorn.jar in 57 class path and request for "nashorn" script engine from 58 javax.script.ScriptEngineManager. 59 60 Look for samples under the directory test/src/jdk/nashorn/api/scripting/. 61 62 - Documentation |