Midlets

From TreoCentral

Jump to: navigation, search

Contents

Introduction

Midlets are Java programs written for the Mobile Information Device Profile (MIDP), the most popular profile for Java Micro Edition, a.k.a. Java 2 Micro Edition (JME or J2ME). MIDP is targetted at high-end phones, so there are few midlets that take advantage of Treo's larger screen, file system and other capabilities.

Like other Java programs, midlets are very safe to run -- it's all but impossible for them to crash your device, unlike conventional software. The MIDP 2.0 standard allows users to control which midlets can access the network, file system, and/or PIM data.

While the majority of midlets are games, many useful applications have also been written. Generally, a midlet will be less comfortable to use than a similar native Palm OS or Windows Mobile application, if one is available.

Midlets are stored in .jar files or, if they are packaged for Palm OS, in .prc files. .jad files are small files which describe a .jar file and its URL. .jar files may also contain Java programs for desktops or servers, which will not run on handhelds. There is no easy way to determine whether a .jar file contains a midlet or a desktop program, besides attempting to run it.

The core MIDP libraries are identical across all implementations, but optional libraries vary. The optional libraries available for IBM's WEME are file access and PIM (JSR 75) and Web Services (JSR 172). Most phones have a vendor-specific library which gives more direct access to the phone's capabilities. Midlets which use a vendor-specific library will not run on other devices. Some optional libraries which are not currently available for WEME are Mobile 3D Graphics API, Mobile Media API (JSR-135), Content Handler API (CHAPI), and Security and Trust Services for J2ME (SATSA).

Installation

Palm OS

First, you must install a JME runtime. While the Sun Reference Implementation is available, it only implements the MIDP 1.0 standard and requires midlets to be specially packaged for Palm OS. IBM's Websphere Everyplace Micro Environment (a.k.a. WEME or J9) implements the MIDP 2.0 standard that most midlets are written for. There is a separate version of WEME for each model, which can be downloaded from www.palm.com. It is free some some models and costs $5 for others.

There are several ways to install midlets into the WEME environment.

  • Downloading in a web browser. Blazer and other modern browsers know to hand off .jar or .jad files to WEME. Requires air time unless you are connected to the Internet via Bluetooth, Wi-Fi, or USB.
  • HotSyncing midlets pre-packaged in .prc files. These are HotSynced like any other Palm database. Midlets packaged in .prc files for Sun's Reference Implementation cannot be installed into IBM's WEME, and vice versa.
  • HotSync, RegisterJar and VFS Exchange. .jar files cannot be HotSynced until Palm OS is told where on the VFS to put them. You can do this manually with Peter Monko's Card Directories preference panel, or automatically with Doug Reeder's RegisterJar application. VFS Exchange and RegisterJar are available together at http://csml.som.ohio-state.edu/~reeder/VFSExchange/
    • Preparation. Only needs to be done once. Either
      • Install RegisterJar and VFS Exchange onto your Palm, or
      • Install Card Directories and VFS Exchange onto your Palm and use Card Directories to map .jar files to /Palm/Programs/MIDP.
    • Midlet installation
      • HotSync the .jar file containing the midlet
      • Run VFS Exchange
      • Navigate to /Palm/Programs/MIDP and select the .jar file
      • Select "J9 Exchanger" from the "Handled by" pop-up menu.
      • Tap the "Import" button
  • An SD card writer (or Softick's Card Export, Palm File Browser, or The Missing Sync) and VFS Exchange. VFS Exchange is available at http://csml.som.ohio-state.edu/~reeder/VFSExchange/
    • Preparation. Only needs to be done once.
      • Install VFS Exchange onto your Palm
    • Midlet installation
      • Write the .jar file containing the midlet to an SD card
      • Insert the card in your Treo
      • Run VFS Exchange
      • Navigate to /Palm/Programs/MIDP (or wherever you wrote the .jar file to) and select the .jar file
      • Select "J9 Exchanger" from the "Handled by" pop-up menu.
      • Tap the "Import" button

Windows Mobile

Desktops

Midlets can also be run on desktop machines which have both Java Standard Edition (JSE or J2SE) and special MIDP libraries installed. Two packages that include the MIDP libraries are Sun Java Wireless Toolkit and MPowerPlayer.

Use

Palm OS

When using IBM's WEME, midlets are shown in the Launcher, like conventional programs. You can also launch them by tapping on the IBM Java VM icon in the Launcher, selecting the midlet from the list, and tapping Launch. You can also use the IBM WEME application to delete midlets and set permissions and settings for each midlet, which include whether it is allowed to use airtime .

Windows Mobile

Midlets Useful on Treos or Otherwise Notable

KMaps

Downloads and displays maps and interfaces with social media.

Google Web Services clients

Amazon.com Web Services clients

Personal tools