Mobile Phone Development

Colin P. Fahey


<<< BACK TO MOBILE DEVELOPMENT


CORE DEVELOPMENT TOOLS

This section describes how to download development tools that can be used
to compile J2ME source code in to class files suitable for mobile devices.
Note that Sun's "J2ME Wireless Toolkit", discussed in a later section of this
article, requires downloading the Java SDK described in this section.

JDK 1.4 (or later)

This means you need the conventional Java 2 SDK from Sun. I downloaded and used version 1.4 via the following link:

http://java.sun.com/j2se/1.4/download.html

Here's what the download web page looks like:
Run the installation program. Install to the default location (c:\j2sdk1.4.0_03) unless you are able to solve path problems that may arise.


Connected Limited Device Configuration (CLDC)

I won't pretend to know what this is, but I simply downloaded it from the Sun web site.

http://wwws.sun.com/software/communitysource/j2me/cldc/download.html

Here's what the CLDC main download web page looks like:
Only 1.0.3 was available at the time I visited. In order to download this, I needed to register with Sun web site. I created the following profile:

USERNAME: anon***anon PASSWORD: nospamplease FAVORITE COLOR: blue FULL NAME: Prof. Anon Nospamplease

I downloaded the following file:

j2me_cldc-1_0_3-fcs-src-b17-winunix-14_sep_2001.zip

I unzipped to the following directory:

C:\j2me

I renamed the "cldc-1_0_3-fcs" directory to simply:

cldc

(i.e., full path is c:\j2me\cldc)


Mobile Information Device Profile (MIDP)

I won't pretend to know what this is either, but I simply downloaded it from the Sun web site.

http://java.sun.com/products/midp/

Here's what the MIDP main download web page looks like:
I downloaded the following file:

j2me_midp-1_0_3-fcs-src-b26-win-19_sep_2001.zip

I unzipped to the following directory:

C:\j2me

I renamed the "midp-1_0_3-fcs" directory to simply:

midp

(i.e., full path is c:\j2me\midp)






CONFIGURING TOOLS

ESTABLISH PATHS

Add the following lines to you AUTOEXEC.BAT file:

REM ---- Java Support ---- SET MIDP_HOME=C:\j2me\midp SET PATH=%PATH%;c:\j2sdk1.4.0_03\BIN; PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\j2sdk1.4.0_03\BIN;C:\j2me\midp\bin;%PATH%

Then force these variables to be reloaded by running the batch file:
[CURRENT DIRECTORY: "C:\"]

autoexec.bat

You can also set up these same variables using the Windows environment variable control panel. Notice that I just hard-coded the path to my Java 2 SDK version. If I upgrade, I have to modify the AUTOEXEC.BAT file.

CHECK THE JAVA 2 SDK BINARIES

Once the settings above take effect, you should be able to run the Java utilities from the command line without specifying the complete path to the executables. Try running the phone emulator:
[CURRENT DIRECTORY: "C:\"]

midp

Here is what I saw:


<<< BACK TO MOBILE DEVELOPMENT



CONTACT INFORMATION

Colin P. Fahey cpfahey@earthlink.net

http://www.colinfahey.com