Helma Logo
main list history
previous version  overview  next version

Version 1 by hannes on 30. April 2009, 10:54

=== Installation

To get started with Helma NG you need to check it out from either *Subversion|https://dev.helma.org/svn/helma-ng/trunk* or *Git|http://github.com/hns/helma-ng/tree/master*. For Subversion, the command is:

<tt style="font-weight:bold;color:#d33;">svn co https&#58;//dev.helma.org/svn/helma-ng/trunk/ helma-ng</tt>

For Git:

<tt style="font-weight:bold;color:#d33;">git clone git://github.com/hns/helma-ng.git</tt>

Helma NG uses *Apache Ant|http://ant.apache.org/* as its build tool. Once you have Apache Ant installed change to the helma-ng directory you just checked out and run ant it with the "jar" target:

<tt style="font-weight:bold;color:#d33;">ant jar</tt>

If this worked then you should now have a file called lib/helma.jar.

=== Starting the shell

Once you have built the jar files you should be able to start the Helma NG shell. Just run the helma script in the bin directory without arguments:

<tt style="font-weight:bold;color:#d33;">/bin/helma</tt>

This should start a shell session with a <tt>helma&gt;</tt> prompt. You can enter and evaluate any JavaScript expression. You can scroll through your session history using the <Up> and <Down> keys, hitting <Tab> will try to auto-complete your current input. Use the <tt>include</tt> or <tt>require</tt> functions to load any Helma NG modules:

<tt>helma> include('helma/file');
helma> var file = new File('README.txt');
helma> file.open();
helma> file.readln();
Helma NG
helma> file.close();

=== Running the demo app

To run an actual web application simply pass the main file of the app to the helma command:

<tt style="font-weight:bold;color:#d33;">/bin/helma apps/demo/main.js</tt>

This will start the *Helma NG demo app|http://helma-ng.appspot.com/* on port 8080. Enter the following URL in your browser to access the app:


You can also run an application and the shell at the same time by adding the -i or --interactive option before the application name: 

<tt style="font-weight:bold;color:#d33;">/bin/helma -i apps/demo/main.js</tt>

Use the -h or --help flag for more information on available options.