Downloading Programs - Motorola T720 Developer's Manual

Hide thumbs Also See for T720:
Table of Contents

Advertisement

Developing for the
Motorola T720 Handset

Downloading Programs

This section explains how to download a MIDlet program to the Motorola T720 handset.
Serial Downloading
By default, the serial downloading of programs is disabled on Motorola T720 handsets. It
is recommended that you use OTA instead to load programs on the device for testing.
Over the Air (OTA) Downloading
You can download Java™ MIDlets from any web server as long as that server
understands the Java Archive (JAR™) and Java Descriptor (JAD™) file MIME types. The
MIME type descriptors to use are:
JAD files: text/vnd.sun.j2me.app
JAR files: application/java-archive
For more information, check your web server documentation.
CodeWarrior Wireless Studio produces both the JAR and JAD output files when compiling
a Java project. The JAD file contains a MIDlet-Jar-URL line, which automatically
points to the program's location while under development. This is the wrong location once
you move the JAR file (e.g. by loading it onto a server for download).
For example, if the program mytest.jar is uploaded to the test directory of
www.testserv.com, then the JAD file's MIDlet-Jar-URL line needs
modification. Where it once said:
MIDlet-Jar-URL: C:\Program Files\MyTest\mytest.jar
You modify it to read:
MIDlet-Jar-URL: http://www.testserv.com/test/mytest.jar
Once the JAD is correctly modified, both files can be uploaded to the web server. After
that, the MIDlet is available for downloading from the web server just as any other file
stored there. At this point, you can just key in the URL to the JAD file on the handset to
download it.
Continuing with the above example, you would type this URL into your WAP browser to
access the MIDlet:
http://www.testserv.com/test/mytest.jad
NOTE: JAR files cannot be downloaded directly onto phones. The only way to properly
install MIDlets is to download the JAD files, which then download the JAR for you. If you
set up an index page to allow MIDlet downloading, be sure your links point to the JAD files
and not the JAR files.
33

Advertisement

Table of Contents
loading

Table of Contents