Download it, extract it somewhere, open a console and simply run:
> jls Usage: jls [options] script [args...] where options include: -bs <bootstrap script file name> The file name of the script to use for bootstrap. -ep <extension path> A directory to search for native library files, script ZIP files and directories. -lp <library search path of directories> A ; separated list of directories to search for native library files. -sp <script search path of directories and ZIP files> A ; separated list of directories and ZIP archives to search for script files. -D<name>=<value> Set a system property.
The script that you want to run must be available in the extension or the script path. The native library that you want to load must be available in the extension or the library path. The default extension path is which includes all the default libraries.
You can found more information in the documentation.
The following packages are available in the default runtime archive (rt.zip).
Since 0.5, jls is based on AMD for defining its classes and provides a global function.
A minimalist PHP library is available with the distribution (php.zip) and used in the PhotoBlog tool.
The tests are available in the test archive (test.zip).
> jls jls/jsunit/TestRunner -all 96 test(s): 0 error(s) and 0 failure(s)
The following is the hello world script.
var System = require('jls/lang/System'); var InputStreamReader = require('jls/io/InputStreamReader'); var BufferedReader = require('jls/io/BufferedReader'); System.out.print('Please, enter your name : '); var reader = new BufferedReader(new InputStreamReader(System.in)); var name = reader.readLine(); System.out.printf('Hello %s !', name);
And the following is the execution result.
> jls hello.js Please, enter your name : spyl Hello spyl !
Other examples are available in the demo archive (demo.zip).See the demos