July 2003
Developing J2ME
Applications on Sony
Ericsson Phones using
CodeWarrior Wireless
Studio
T610 P800
Contents
1. Purpose of this Document................................................................................................ 3
2. Document history .............................................................................................................. 3
3. What You Need .................................................................................................................. 4
4. Developing J2ME Applications ........................................................................................ 4
4.1. CodeWarrior Icon Reference ...................................................................................................................4
4.2. Hands-on Programming in J2ME .............................................................................................................5
4.3. Working with Existing Projects ...............................................................................................................12
Preface
1. Purpose of this Document
This document provides a step-by-step description of how to develop J2ME applications on Sony Ericsson phones
using CodeWarrior Wireless Studio.
2. Document history
Change history
2003-07-25 Release 1.1 Initial Release
This document is published by Sony Ericsson Mobile
Communications AB, without any warranty*.
Improvements and changes to this text necessitated
by typographical errors, inaccuracies of current
information or improvements to programs and/or
equipment, may be made by Sony Ericsson Mobile
Communications AB at any time and without notice.
Such changes will, however, be incorporated into
new editions of this document are to be regarded as
temporary reference copies only.
*All implied warranties, including without limitation
the implied warranties of merchantability or fitness
for a particular purpose, are excluded. In no event
shall Sony Ericsson or its licensors be liable for
incidental or consequential damages of any nature,
including but not limited to lost profits or commercial
lost, arising out of the use of the information in this
document.
3. What You Need
To develop J2ME applications with Sony Ericsson phones, you will need to download the Sony Ericsson J2ME
SDK from the Sony Ericsson website and CodeWarrior Wireless Studio IDE. Note that you can also use Sun One
Studio but this document describes how to develop J2ME applications using CodeWarrior. It is best to install
CodeWarrior first and then install the J2ME SDK.
Table 1. T610 J2ME Development Requirements
Language Development
Environment
SDK Links
J2ME CodeWarrior Wireless
Studio
or
Sun One Studio 4 IDE
SEMC J2ME SDK www.sonyericsson.com
www.metrowerks.com
www.java.sun.com
4. Developing J2ME Applications
This section provides a step-by-step procedure for developing J2ME applications for Sony Ericsson phones using
the CodeWarrior Wireless Studio IDE. Note that this document describes how to develop for the P800 but
developing for other Sony Ericsson phones is similar. For example, to develop for the T610, just select the T610
selection instead of the P800.
4.1. CodeWarrior Icon Reference
The icons that you will be using in the following steps are shown in Figure 1. All steps that require you to click on
an icon will reference this figure. This particular figure is from CodeWarrior for Symbian; however, the location of
the icons are the same for both CodeWarrior for Symbian and CodeWarrior Wireless Studio.
Figure 1. CodeWarrior Icons
4.2. Hands-on Programming in J2ME
This section helps you get started writing J2ME applications Sony Ericsson phones using the P800 as an example.
If you are developing for another Sony Ericsson phone then substitute that phones name (i.e. T610) for the P800.
• Install CodeWarrior for Wireless Studio. You should install CodeWarrior before you install the J2ME SDK
• Install the Sony Ericsson J2ME SDK.
• Install the PC Suite communication program. This allows you to download your applications to the Sony
Ericsson phone. (NOTE: This is not needed for the T610 phone)
• Click on the CodeWarrior Wireless Studio icon to start the IDE. A screen similar to Figure 2 appears.
Figure 2. CodeWarrior Wireless Studio IDE
• Select File | New from the main menu. A dialog appears as shown in Figure 3. Fill in the dialog box
parameters:
• Select MIDP MIDlet Wizard.
• Click the Set button and browse to your root directory of your projects. (i.e. c:\dev)
• Enter MyMidlet in the Project Name field. Note that the location directory changes to match your project.
评论0
最新资源