ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software»
  • Computer Science & Programming

Simple Steps to Start Developing Mobile Applications (Cellphone APPS) in Java

Updated on December 23, 2011


If you're searching for some simpler ways and methods to familiarize yourself with world of "Mobile Application Development", then, I think you finally landed on correct destination (article). Here, I'll show you all the steps that are required in understanding and making usage of this great platform of Application Development, which will help you in reaching pockets of humans without going there. I called Mobiles / Cellphones a great platform because this is the platform which remains active nearly 24 hrs a day either in hands of people or in pockets and can be accessed by users (i.e. owners of devices) at anywhere and at anytime. It is one of the most nearest and closest part of everyone (Who use them).

Difference between mobile app and mobile web
Difference between mobile app and mobile web | Source

Programming Language for Developing Mobile/Cellphone APPS

There are lot of languages and tools by which you can develop mobile apps but problem arises when some devices failed to install/run our applications due to limited device compatibility. But, there exist a language called Java ME (j2me) (A smaller form of java , which has been released to cover cellphone market) and is supported by maximum number of devices in this market. Here, "ME" in Java ME is shorter form of "Micro Edition". It divides devices into two type of configuration i.e. CLDC and CDC, which is explained below.

  1. CLDC - Connected Limited Device Configuration,
  2. CDC - Connected Device Configuration.

"CLDC" includes the range of phones which are unable to support full features of java due to limitations in storage, memory and power etc., while on other hand range of phones falling in "CDC" category doesn't have such shorter limits and they also have their own plus points. Let's end up our discussion here and come to procedure. Here, Below aresteps that are required in building up your first cellphone/mobile application.

Installing and running Java ME (Micro Edition) SDK (Software Development Kit)

These section deals with steps that are required to be followed at minimum before developing your first cellphone application, just follow them.

  • Download Java ME SDK (3.0 or Latest Version) from here (I'm using Java ME SDK 3.0 and it is my personal recommendation to start with).

Software and System Requirements:

  1. Java SE Development Kit - JDK 1.6 or latest,
  2. NetBeans version 6.9 or higher for installing Java ME SDK 3.0.5 and higher versions, which is not my personal recommendation for beginners while considering my future tutorials in mind.
  • After fulfilling the system requirements by downloading and installing necessary softwares, Click on executable (.exe) file of Java ME SDK to install and make it run. Below is the sample snapshot of Java ME SDK 3.0 (similar to its first run).

The Start page of java ME SDK 3.0.
The Start page of java ME SDK 3.0. | Source

Creating and Editing your first Mobile APP

This section covers the steps that are required in creating and developing your first cellphone APP (i.e. a simple hello world program) with this SDK.

  1. After Installing, Go To Start -> Programs -> Java(TM) ME Platform SDK 3.0 -> Java(TM) ME Platform SDK 3.0 OR if you downloaded and installed 3.0.5 or higher versions, then, go to Go To Start -> Programs -> NetBeans -> (NetBeans IDE 7.0.1 or any which is installed on your computer).
  2. Then, after opening SDK, Go to File (Top-Left Corner) -> New Project -> Java ME -> MIDP (or mobile) Application -> Next (At Bottom) -> Next - > Finish.
  3. And, Finally A screen will appear on your screen with some j2me code in it. This is the Code which is required at minimum by any j2me (Mobile/Cellphone) application for proper functioning. I would not recommend to delete it because it will never interfere in your development cycle except the "startApp()" function which plays crucial role in beginning of application life cycle.

In simpler terms, "startApp()", "pauseApp" and "destroyApp" are life cycle functions of any application which executes automatically at three different states of any applications which are explained below.

  1. "startApp()" - executed on top of everyone to begin application life cycle.
  2. "pauseApp()" - get executed when application goes in state of being paused i.e. user has moved his focus from current application to some other tasks in his/her device. for example, when a phone call comes in between the usage of this application by user, application automatically goes into pause state.
  3. "destroyApp()" - get executed when user exits the application i.e. termination of life cycle.

Running your First Application

This section deals with steps that are required in running your first mobile application ("Hello World!" program).

You can run your application in three type of modes either from menu bar (by clicking on "RUN") or by right clicking on project.

  • Either you can run directly, which will skip the process that will be faced by real users while installing it,
  • Or you can run it via OTA (Over the Air), which will try to show you all the steps that will faced by users while installing your application in their devices.
  • Third one (Running in Debug Mode) helps us in finding out bugs and errors (if any).

Below is the snapshot showing "how to run project" via right clicking on it.

Running your first application in real device (Mobile/Cellphone)

To run your first application on your phone, then, you can do so by following steps shown below.

Steps need to be followed if you build application via Java ME SDK 3.0

  1. Go to: "C:\Users\seven\Documents\JavaMESDKProjects\your~project~name\dist\",
  2. Then, you'll see two files with your project name but with twoo different file extension i.e. with ".jad" and ".jar",
  3. Send that jar file to your phone and install it.
  4. after that you can go to applications folder in your cellphone and try running it.

Steps need to be followed if you build application via Netbeans IDE and Java ME SDK 3.0.5

  1. In this case, you will find applications here "C:\Users\seven\Documents\NetBeansProjects" and all other steps are same.


"Source Code" of this program is explained in next chapter (Article), Where you will learn about "How it is easy to code applications in java and j2me" (If you never programmed and tried your hands with this language).


    0 of 8192 characters used
    Post Comment

    • moneytoplist profile image

      moneytoplist 5 years ago

      I tried to learn java mobile but I gave up after a few days. I found out I can build the application I need using HTML 5 and jquery mobile and it seems to be much easier way for me.

    • itech profile image

      Krishna 6 years ago from New Delhi, India

      Okay Fine! Just mail me your code.

    • profile image

      honey 6 years ago

      i am still trying to insert audio,video,image but not at found ythe correct solution..

      can u help me to write the correct code

    • profile image

      me 6 years ago

      thank is helped me

    • profile image

      honey 6 years ago

      How many days will u take to send's very urgent can u send me as soon as possible

    • profile image

      jo 6 years ago

      can u tell how we can insert audio nd video

    • profile image

      honey 6 years ago

      how we can insert the audio,text n vedio files into this jar files

    • itech profile image

      Krishna 6 years ago from New Delhi, India

      @swarna, glad to know that!!!

    • profile image

      swarna 6 years ago

      Thank is helped me a lot........

    • itech profile image

      Krishna 6 years ago from New Delhi, India

      @emma, Glad to see that you liked it. if you prefer not to use "Netbeans" then You should download Java Me SDK 3.0 (My Personal Recommendation) which has inbuilt IDE (Integrated Development Environment) and very simple interface to work with. Here is the download link

    • profile image

      emma 6 years ago

      am loving this. bt wish to do it witout netbeans

    • itech profile image

      Krishna 6 years ago from New Delhi, India

      @admire, thanks for admiring.

    • profile image

      admire 6 years ago

      i just loved it its awesome thanx guys