Helma Logo
main list history
previous version  overview  next version

Version 6 by hannes on 19. May 2009, 14:10

This is a very short tutorial on how to install and start using Helma NG.

=== Installation

Helma requires Java 1.5 to run and uses *Apache Ant|http://ant.apache.org/* as its build tool.

To get started with Helma NG either *download the latest release|http://github.com/hns/helma-ng/downloads* or 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>

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.

=== Using the shell

Once you have built the jar files you should be able to start the Helma *Helma NG shellshell|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> <tt>include</tt>, <tt>require</tt>, or <tt>require</tt> <tt>import</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.