Motorola A780 Manual To Getting Started - Page 2
Browse online or download pdf Manual To Getting Started for Cell Phone Motorola A780. Motorola A780 5 pages. J2me
Also for Motorola A780: Service Manual (48 pages)
4. Creating a simple J2ME application
Here's a basic runthrough on how to create a simple J2ME application, basically a
J2ME hello world.
1. Create a new J2ME project: http://eclipseme.org/docs/createProject.html
2. Create a new Midlet in the project named "HelloWorld" A midlet is a
J2ME application and represents the main UI class for a project.
http://eclipseme.org/docs/createMidlet.html
3. You can use the following source for the midlet: Helloworld.java
4. You can debug and install using the installation instructions below.
5. Debugging J2ME applications in the simulator
This section will cover debugging and the use of the M3 simulator in conjunction
with Eclipse. It is recommended that you try to run applications in the emulator
before trying to run them on the phone.
1. Choose Run... from the Run menu of ecipse.
2. Under Configurations, double click on the header Wireless Tookit
Emulator to create a new configuration. The project name should be auto-
populated with your current project. Under "Executable: Midlet" enter the
name of your Midlet.
3. Under the emulation, platform definition tab, choose "Motorola SDK for
J2ME MOJM3"
4. Click on Run to start the Midlet in the emulator.
To debug instead of run, complete the same setup under "debug..."
6. Installing the application on the phone
There are two files needed to install your J2ME application on the phone. One is
the jar file which contains all of your compiled java code. The other is the jad file
while contains metadata about your application and permissions information.
Both of these are generated by Eclipse. To make sure they have been updated
properly before loading them onto the phone, right click on your project name in
the Package Explorer and select "J2ME" "Create Package" from the context
menu. This will force a regeneration of the jar and jad file in the deployed folder
for your project.
Make sure you phone is in USB Mass Storage mode by going to the main menu,
set up, usb mode and choosing "mass storage." Select "save" to exit out of the
settings. Your phone will now mount as a USB hard drive when plugged into your
computer.
Plug in your phone and open up a file explorer window with the newly mounted
drive. Copy the jad and jar files from the deployed folder of your project to the
drive. Wait a few seconds and then unplug your phone. The files are now in the
flash file system of the phone.