J2ME application development Getting Started nine points

1, J2ME Java basic knowledge required in

Most people now are starting from scratch learning J2ME, J2ME's time to learn, always from the foundation to start learning Java, and now books about Java-based foundation are based on J2SE speaking, which led to the study some unnecessary trouble, the following will be used in J2ME and basic knowledge of Java do not need to do a simple explanation.

J2ME Java used to the basics:

1, Java syntax basics: the basic data types, keywords, operators, etc.

2, object-oriented thinking: the concept of classes and objects, inheritance and polymorphism and so on.

3, exception handling

4, multi-threaded

J2ME does not use the Java Basics:

1, JDK in order to use javac, and java

2, Java foundation classes in J2ME in a lot of no, or a class method done a lot of streamlining. Therefore, the proposed library in J2ME familiar.

3, Applet, AWT, Swing is the fundamental knowledge to use in J2ME not.

Simple so much, want to learn J2ME few friends to take some detours, deficiencies hope the positive corrections and additions.

2, J2ME features that temporarily can not be completed

Out a number of J2ME features that temporarily can not be completed, I hope all of you will add:

1, the phone does not change the code to achieve transplantation, mainly referring to the game.

2, the dynamic changes the button text.

3, to accept Chinese input in the Canvas.

4, the operation of local resources, such as address book, received text messages and so on.

5, producing destructive mobile phone virus.

6, the other waiting for you to add.

3, J2ME platform of cross-

J2ME technology from Java, it also has the advantage of JVM, you can support the Java platform in the transplant, but now the J2ME technology in cross-platform but do bad, let's briefly look at the reasons:

1, mobile phone screen sizes vary:

The main production on the interface. If you are using advanced user interface, such as you to do is application development, or user login, user registration such common functions, generally without any problems.

If you are using a low-level user interface, such as you do is gaming, then you need to consider this issue.

2, the expansion of API manufacturers are not uniform:

For example, the expansion of Nokia UI API library series, in other phones or not achieved, or different package names and so on.

3, mobile platform to achieve the bug:

For example, the 7650 Nokia have in achieving the double-buffer bug, then run the software on this model can not use double buffering. NOKIA on some of the other bug, you can see: **blog.csdn**/Mailbomb/archive/2005/03/24/329123.aspx

4, mobile performance problems.

Different mobile phones available memory, the largest jar files are required, such as Nokia S40 mobile phone support most of the biggest jar file is 64K, most available content is 210K.

So the mobile phone software, especially games list of all supported models also have a cell phone game transplantation presence.

Fourth, learn to engage in the kind of work J2ME

J2ME technology now can be quite hot, here are some J2ME can then be engaged to learn the types of work:

1, J2ME Game Developer

According to the game plan or document required in a particular type (for Nokia S40 or S60 mostly) developing games. This is now the majority of the work J2ME programmer.

Need to master: Advanced user interfaces, low-level user interface thread, if it is online games, but also skilled network programming.

2, J2ME application developers

Now is not a lot of mobile applications, but there were some, particularly the mobile location and mobile business-related content. Need to master: Advanced user interface thread and network programming.

3, J2ME games transplant staff

Reference source code, will be able to run on a platform game ported to other platforms go up. Such as Nokia S40 games ported to S60, or Sony Ericsson's T618 and so on. Mainly control the screen coordinates, and some may need to replace some of the API.

Need to know the difference between the platform and related technical parameters, such as screen size, the largest jar file size, etc..

5, J2ME programming several principles

1, using object-oriented programming.

Although the use of process-oriented programming can reduce the file size, but to maintain convenient and conducive to future expansion, or to use the object-oriented programming.

2, using the MVC pattern

The model, interface and control the separation. Now many of the procedures will be three-one, but if you do procedures relatively large, then suggest you to be separated.

3, automatically stores user settings

Use RMS to store user information, such as storing user last entered user name, password, user settings, etc. for the system, not only can reduce the user's input, but also user-friendly. Many programs can even make an automatic landing.

4, a number of system settings allow users to turn off. Such as background music, background light display.

5, the low-level user interface rendering action in a separate thread to go inside.

6, in the amount of time needed to complete the work, to the user interface of a wait.

6, from the simulator to the real machine test

For J2ME developers, the simulator gives us a lot of convenience, such as in the emulator debugger, and very easy to see the program's effectiveness, but simulator also gives us some problems, such as simulator the bug and so on, so a real machine testing is necessary.

1, Why the real machine test?

Because the simulator program possible bug, and the real machine's performance is limited, so must be true test.

2, how to program transferred to the machine?

The program transferred to the machine are as follows:

a) OTA Download

b) use a data cable transfer

c) Infrared transmission

d) Bluetooth

Conditions you can choose the suitable way.

3, the main measure a real machine test what?

Real machine test many things, mainly testing the following:

a) program features

b) operational procedures, it is easy to operate

c) the size of the program, such as Nokia S40 series phones most of the accepted maximum file size is 64K

d) running speed, the speed is tolerable.

7, to the vendor from the WTK SDK

For J2ME lovers, basically we are all from the SUN's WTK (J2ME Wireless Toolkit) started, but for practical applications, using only the WTK is not enough, so in the learning process must be completed from the WTK leap to the SDK.

1 vendor SDK download address?

· Nokia

Nokia mobile phone industry is worthy of the boss's support for j2me is excellent, with a special website and a variety of documented SDK.

Website is: ****.cn/sch/index.html

· Siemens

Siemens is also a good support for J2ME, which provides SDK, simulator requires separate installation. Download the following address:

https: / / LangID = 0 & MainMenuID = 2 & LeftID = 2 & pid = 1 & cid = 0 & tid = 3000 & xid = 0

· SonyEricsson

SonyEricsson SDK and its emulator, download address is:



· Motorola

Motorola offers a special SDK, including the internal simulator, download address is:


· SamSung

SamSung also provide a special SDK and emulator, download address is:


· NEC:

NEC also provides an integrated simulator of the SDK, download address is:


2 vendors SDK and WTK What is the difference?

The simplest understanding of vendors SDK is based on the increase in the WTK emulator and his own extended API. In other words, you use the vendor's SDK, you can use the expansion of library vendors such as Nokia's UI library, and manufacturers its own simulator only. API extensions for each vendor are not numerous and varied.

3, How to use?

Some manufacturers use SDK and WTK are the same, such as SamSung. Nokia provides a separate interface to develop, but the actual development of this interface in use much.

4, issue vendor SDK

Manufacturers SDK implementation process, some bug, and inconsistent implementation and the real machine. For example, problems like NOKIA mix playback.

8, in the J2ME way to get phone IMEI

IMEI is the Internation mobile entity identification of short, in the phone enter * # 06 # to display the number, length 15, the only, never conflicts, it can be taken as a sign of the user.

The following is to get IMEI in J2ME methods:

1, MOTO series of phones you can read the IMEI system property access, the code is as follows:

String imei = System.getProperty ("IMEI");

2, SIEMENS series of phones you can read the system com.siemens.IMEI property acquisition, the code is as follows:

String imei = System.getProperty ("com.siemens.IMEI");

9, J2ME network connection solution to the problem shown in

In network programming, sometimes without receiving some data on the display interface to the network, the resulting interface is not consistent with requirements (such as bulletin shows that notice will be displayed before the background image and then display the information notice), to mention here a simple solution for you:

Way to solve this situation is divided into three steps:

1, the need to display interface, the call to send network data. Each display is called the constructor does not call the Display of setCurrent method show.

2, showing wait interface (such as progress bars, etc.), to the user prompts, making network connections.

3, in dealing with network data completed feedback after the setCurrent method called Display display shows the current interface.

See article I wrote in 2007: ****/blog/static/93460082007184956990/
标签: basic data types, java platform, jvm, basic knowledge, starting from scratch, button text, java syntax, learning java, javac, polymorphism, java basics, dynamic changes, j2me platform, java foundation classes, chinese input, mobile phone screen, mobile phone virus, proposed library, j2me technology, fundamental knowledge
分类: Mobile
时间: 2010-07-31


  1. Use Eclipse JEE + Mtj + Nokia S60 V3SDK J2ME application development environment to build

    Use Eclipse JEE + Mtj + Nokia S60 V3SDK J2ME application development environment to build 2010-04-07 16:53 Und ...
  2. J2ME application development Getting Started nine major points

    1, J2ME Java basic knowledge required in most people now are learning from scratch J2ME, learning J2ME time, a ...
  3. Senior J2EE application development online course

    Chapter Name The main knowledge points 1 Web Application and J2EE Overview Web Application, HTTP, application ...
  4. 12-step "teaching your iPhone application development

    iPhone mobile phone for the fashion wave of people, you will definitely be familiar, while the iPhone's popula ...
  5. Interface prototype in software application development

    Prototyping in the software development process is now widely used. First of all, we must be clear that any me ...
  6. Google Map with the Flex application development

    Document options <noscript> </ noscript> <noscript> <tr valign="top"> <td ...
  7. MVC model based on J2ME application framework design

    Reprinted: 1 J2ME application framework status Sun in June 1999 intro ...
  8. The next 2 years Application Development Trends of Mobile

    This time the hot fried mobile application development, mobile development in the field of the math themselves ...
  9. Android development platform is an open platform, which is located in the top four application development framework, will inevitably involve Android components. This article will explain to you Android components.

    Android development platform is an open platform, which is located in the top four application development fra ...
  10. WAP application development environment built

    J2ME Development Network has recently opened up a Java technology and WAP development project, the development ...
  11. Rapid mobile application development platform (2)

    Smart Client (MClient) Covering a wide range, compatible with multiple models MClient covers the vast majority ...
  12. MES for mobile application development as simple as web production

    Only three days, you can develop professional mobile applications! Rapid development of three steps: 1 Install ...
  13. Use PHP to master Facebook Application Development

    Application, an application to the Java ™ code. Before you begin About this series Rational Application Develo ...
  14. ICE high-performance distributed application development middleware Introduction

    This document was originally based on a chance to do it into the blog archives to prepare for as is. Please do ...
  15. Web search using Lucene to speed up application development

    This article is taken from: Lucene Java-based text inform ...
  16. Hadoop basic processes and application development

    Hadoop basic processes and application development
  17. Enterprise Application Development Bible

    Productivity in 2003 Jolt Award winner Software Development Magazine 2003 Reader's Choice Award winner 2003 Ed ...
  18. Application development in data dictionary design and implementation of programs

    Application development in data dictionary design and implementation of programs
  19. To share a design and development of their enterprise application development framework

    Integrated application of the SSh architecture, optimizing the development of basic libraries, simplifying app ...