You are here


Mobile Developer's Guide to the Galaxy- from J2mePolish site

News from J2mepolish site:

Mobile Developer's Guide- first edition out now

Some JSR 179 Location API J2ME examples

The first 3 examples come from .
1, The basic Location Question

  1. import javax.microedition.lcdui.*;
  2. import javax.microedition.midlet.*;
  3. import javax.microedition.location.*;
  5. public class CoordinateAlert extends MIDlet implements CommandListener {
  7. private Display display;
  8. private Form mainForm;
  9. private Alert positionAlert;
  11. public CoordinateAlert() {
  13. mainForm = new Form("HelloMIDlet");


Test Push Registry in Wireless Toolkit 2.5(WTK)

There is many articles about how to test Push Registry with sms, here will give some hints how to test it in WTK.

I. Edit *.jad configuration

MIDlet-1: appname,/app.png,com.easywms.midlet.midletClass
MIDlet-Push-1: sms://:50000, com.easywms.midlet.midletClass, *

or MIDlet-Push-1: sms://:50000, midletClass, *

II. The app must be install via OTA in WTK, this is required for WTK Push testing


Get CellId and other Imformation from mobile phones via J2ME

Without GPS or Network Operator we can still use the Location Based Service, via the help of CellId(Cell ID the location of Cell Identities of GSM-networks). Google has one enormous database of cell ids which are linked to a longitude and latitude position, that why Google Map client know where you are even you have no embedded GPS--it is not open.

The JavaME Frequently Asked Questions List (T)


The JavaME Frequently Asked Questions List

The JavaME Frequently Asked Questions list is a compilation of questions that are
asked frequently by people using
Java 2 Micro Edition

Maintained by:


"Cannot allocate memory" OutofMemory when call Ant to build Polish project in Tomcat

I have written one J2EE web service which was run in Tomcat, this service will call Ant to build one J2ME Polish project. It can be run without problem, aber will got such exception "ProGuard is unable to obfuscate: Cannot run
program "java": error=12, Cannot allocate memory" after several times' building. This is abvious OutofMemory exception.

Tomcat service was run on CentOS linux, the first thing what i thought is to increase the initial memory of Tomcat.

HTTPS Connection with Tomcat and WTK emulator

1. Tomcat Configuation

Creating HTTPS Connection

Firstly should create a temporarely SSL certificate to use the
Tomcat in an SSL mode.


MIDlet jar signing (a tutorial) Revised (T)

Author: David Hayes

Recommended to visit original blog to view lots of useful comments 



Some Data Interchange Ways in Java ME

Just record some ways of data interchange in J2ME.

1. XML

1.1 KXML


Size: 30 kb

XML Pull Parser, tested, low memory needed

1.2 XPP3



Subscribe to RSS - J2ME