J2ME Basics

Leave a comment

J2ME is widely used platform for all java phones.Even though J2ME market has gone down most of the device manufacturers are targeting low-cost devices with Java platform.  Below are the steps to start J2ME development.

1. Download the Java ME platform SDK3.0 from the below link and install it(for windows).
2. Once the installation is done once can do J2ME project both in Java ME SDK ide or through Eclipse pulsar.
3. Eclipse pulsar is the best IDE for midlet development. In J2ME the projects are widely called as midlets. In eclipse import the J2ME by Windows -> Preferences -> Java ME -> Device Management and import it by selecting the J2ME SDK install location.
4. Once it is imported select the suitable phone model and configuration from the displayed list.

5. Now the set up is ready to do a J2ME project.
Now one can start the project by creating a new midlet project and can execute it as ‘Run as – > Emulated Java ME JAD’. Before executing the midlet the respective midlet should get added in to the JAD file of project Application Descriptor.


J2ME – Nokia S60 – Connect to agent problem


Recently I installed Nokia s60 3rd edition in my system.Created a sample Hello Midlet project from eclipse pulsar and tried to execute this midlet in Nokia s60 emulator.But it keep on throwing the following error

“Failed to initiate session
Caught exception
at com.symbian.tools.j2me.sei.emulator.session.RemoteSession$SocketTransport
.getInputStream(RemoteSession.java 50)
at com.symbian.tools.j2me.sei.emulator.session.RemoteSession.”

Atlast the connect to agent fails. I tried to solve this through the following solutions from Nokia forum but no success.

1. Preferences->Java->Debug->Debugger timeout to 120000
Preferences->Java->Debug->Launch timeout to 120000

2.Change the port where IDE and emulator communicates from 110011 to another port 110012 in the   “MIDP Debugging” tab accessing the “Tools->Preferences” menu bar of the emulator.

If any one had faced the same issues and got succeed Please post us the solution.

The project cannot be built until build path errors are resolved – Error in Eclipse IDE


Following content is referenced from


Opening a workspace with several projects, I was presented with the following error for two of the projects:
To resolve this error in eclipse do the following steps.

The resolution was to force a resave of the selected projects (and their .classpath files):

Open the project properties
Select Java Build Path > Libraries
Add a new, arbitrary library (to be deleted later) > OK
Wait for the workspace to refresh (or force a refresh of the project)
The error(s) will go away
Remove the dummy library
The only other references I could find were to make minor alterations of contents of the .classpath file.