Hecl is easy to compile and install as a standard J2SE application.
![]() | 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 |
---|---|
On Microsoft Windows, you must add your java |
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. |
ant packageCommandline
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
java -jar jars/j2se/Hecl.jar tests/suite.hclAn (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.
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
Install the DLTK from the following URL: http://download.eclipse.org/technology/dltk/updates, from with Eclipse.
After downloading you must just associate the *.hcl files to Tcl Source Editor.
→ → → →
Than make a new file type by adding the *.hcl
file type, and
select the Tcl Source Editor.