Installation / Tools & Editors

Tools & Editors

Hecl is easy to compile and install as a standard J2SE application.

[Note]Note
This is only necessary if you'd like to work on Hecl's source code. If all you want to do is use it, or install it on your mobile phone, these steps aren't necessary - the standard distribution contains everything you need.

[Note]Note

On Microsoft Windows, you must add your java bin directory to the system path, otherwise you will get strange, seemingly unrelated errors!

  1. Dependencies:

    You will need to install these software packages if you want to rebuild Hecl.

    Obviously, you need a Java SDK - we suggest something recent like 1.5 or 1.6, as that's what most of the Hecl developers have.
    Depending on what you want to utilize Hecl for, you'll want one or both of the Sun Java Wireless Toolkit or Android SDK.
    Hecl uses the Apache Ant build system, so you need to install that as well to compile Hecl.
  2. To compile the standard, J2SE version of Hecl, do this:
    ant packageCommandline
    
  3. You should now have a Hecl.jar file in the jars/j2se/ directory. To run it, do this:

    java -jar jars/j2se/Hecl.jar Hecl
    hecl> puts "hello world"
    hello world
    
  4. If you want to check your installation of Hecl, you can run the test suite to make sure everything checks out:
    java -jar jars/j2se/Hecl.jar tests/suite.hcl
    	
    An (incomplete) performance test is also supplied so that you can compare numbers if you're curious, or want to hack on Hecl to improve its speed:
    java -jar jars/j2se/Hecl.jar tests/performance.hcl
    	

See the section called “Hecl and Java ME” for more information on installation and use with J2ME.

Tools & Editors

Even if you're not interested in recompiling Hecl to hack on the source code, to write Hecl scripts, you need some kind of editor for programming. Hecl is close enough in syntax to the Tcl programming language that editors that support Tcl work well with Hecl.

  • Emacs' Tcl mode is easy to use: M-x tcl-mode, or if you want to associate .hcl scripts with tcl-mode, add this to your .emacs file:

    (setq auto-mode-alist
          (cons '("\\.hcl$" . tcl-mode)
    	    auto-mode-alist))
    	  
  • Eclipse is popular for working on Java projects. It also has a Tcl mode that can be utilized for Hecl scripts like so:

    Editing Hecl scripts with Eclipse

    1. Install the DLTK from the following URL: http://download.eclipse.org/technology/dltk/updates, from with Eclipse.

    2. After downloading you must just associate the *.hcl files to Tcl Source Editor.

      WindowsPreferencesGeneralEditorsFile Associations

    3. Than make a new file type by adding the *.hcl file type, and select the Tcl Source Editor.