Running AT on J2ME phones

Mounting the HTC harddisk

In order to access the harddisk on your mac you can download SyncMate. The first time you run the software it will install an application on the HTC as soon as you connect it. To allow you HTC device to install the software you will have to press yes when it asks you to install the unknown software.

Once the client software is installed on the HTC, you have the option to mount its harddisk. If Finder does not pop up when you mounted the harddisk you can find it in “Computer”. You can go to Computer by selecting the GO menu in Finder and then selecting Computer or by pressing SHIFT+APPLEKEY+C when the Finder window is active.

SyncMate works pretty good and you can drag and drop files to the device. However, when you edit files on the device using TextMate the changes will not be reflected ! In order to edit files you have to change them on your mac and then copy them back to the PDA.

Installing J9

See the intranet j9 page.

Creating an AmbientTalk Distribution

To create an AmbientTalk distribution you can follow the instructions as given here. However you have to make one change to the build.xml file as shown below.

 <!-- include required library .jar files -->
    <copy file="${iat.project.dir}/lib/java-getopt-1.0.13.jar" todir="${dist.lib.dir}/getopt.jar"/>
    <copy file="${iat.project.dir}/lib/jline-0.9.94.jar" todir="${dist.lib.dir}/jline.jar"/>
    <copy file="${parser.project.dir}/lib/antlr.jar" todir="${dist.lib.dir}"/>
    <copy file="${interpreter.project.dir}/lib/jakarta-regexp-1.5.jar" todir="${dist.lib.dir}/regexp.jar"/>
<!-- include the 'at' native library -->

If you didn’t install the antlr eclipse plugin, make sure that you have configured it correctly and that the generated files are in the correct folder. If you don’t know how, the easiest way to fix this is to install the antlr eclipse plugin and follow the instructions as given here.

It is extremely important to have your eclipse compiler at version 1.3. Otherwise the HTC will throw an incompatible class found exception.

Installing AmbientTalk

Now that you have an AT distribution, rename the distribution folder to AT2 and copy it to the device root folder.

Once it is installed there you still have to make a lnk file to start the interpreter. An example lnk file is shown below.

264#"\Program Files\J9n\bin\j9.exe" "-Djline.terminal=jline.UnsupportedTerminal" "-jcl:ppro11" "-classpath" "\AT2\lib\getopt.jar;\AT2\lib\jline.jar;\AT2\lib\regexp.jar;\AT2\lib\antlr.jar;\AT2\ambienttalk2.jar" "-DAT_HOME=\AT2\" "edu.vub.at.IAT"

Copy paste this code into your editor, save it as AT2.lnk (there should be no newlines in this file!!) and copy it to the AT2 folder on your HTC.

Note that 264 in your lnk file indicates the maximum number of characters allowed in it (see here for more details). The example lnk file above only launches iat and it already takes 243 characters. But, typically you start iat with an AT source file. For this, we recommend you to store a file under the at folder, e.g. run.at, where you specify the code to be executed. For example, to run instantMessenger.at run.at would include the following statements:

/.at.demo.InstantMessenger.createIM(jlobby.at.demo.IMGUI);
network.online();

To pass the file to iat, you should append AT2.lnk with the following:

"-e" "/.at.run;"

Now everything should be ready to run AmbientTalk! Open the file browser of the HTC and go the the AT2 folder. Clicking the AT2.lnk should run your newly installed interpreter.

at/amophtc.txt · Last modified: 2010/10/29 12:42 by tvcutsem
 
 
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki