Quick start to developing Java ME apps

Creating new Hecl applications is quick and easy:

  1. Create a Hecl script. For starters, you could use the hello.hcl script from the tutorial.

  2. Use JarHack to create a new jar and accompanying jad file:

    java -jar jars/JarHack.jar -hecljar jars/cldc1.1-midp2.0/Hecl.jar -destdir /tmp -name Hello -script hello.hcl

    This creates Hello.jar and Hello.jad in the /tmp directory, using the hello.hcl script. It utilizes the MIDP 2.0 version of Hecl in jars/cldc1.1-midp2.0/Hecl.jar

  3. To run this code in the emulator:

    /opt/WTK2.5.2/bin/emulator -classpath /tmp/Hello.jar Hecl
  4. Once you've iterated through a few versions of the script, and are satisfied, you're ready to move it to your phone. Unfortunately, we can't do that for you, as there is no standard method - each phone manufacturer provides their own way. On Linux, I use the following command:

    gammu nothing --nokiaaddfile Application Hecl

    Another way to accomplish this is to put the jar and jad files on a web site and download them with your phone's browser.