原创 2003年01月31日 15:48:00

“CMCC-Motorola Cup” J2ME Contest Technical FAQ of Motorola

J2ME Q&A -Device
 388c
CLDC 1.0 and MIDP 1.0 compliant
Amount of storage for MIDlets -----------up to 2.7Mb
Java runtime memory ----------------------------- 2.5Mb.
Recommended Maximum MIDlet suite size ------- 1Mb.
Maximum Record Store size ----------------------100 Kb.
Display available to MIDlets ---------------- 240x 276.
Color --------------------------------------------------64K
Connection Interfaces------------HTTP, Socket, UDP, Serial port.
Maximum persistent connections---------------------- 4.
Supported image formats ---------------------------PNG.
Double Buffering ----------------------------- Supported.
Encoding Schemes ------------ ISO8859_1, ISO10646.
PNG Transparency ----------------------------Supported.                 
J2ME™ LWT support-------------------------Supported

CLDC 1.0 and MIDP 1.0 compliant
Amount of storage for MIDlets -----------up to 1.0Mb (640K application+415K data).
Java runtime memory ----------------------------- 512Kb.
Recommended Maximum MIDlet suite size ------------- 200Kb.
Maximum Record Store size ----------------------63 Kb.
Display available to MIDlets ---------------- 120 x 160.
Color --------------------------------------------------4K
Connection Interfaces------------HTTP, Sockets, UDP.
Maximum number of sockets -------------------------- 3.
Supported image formats ---------------------------PNG.
Double Buffering ----------------------------- Supported.
Encoding Schemes ------------ ISO8859_1, ISO10646.
PNG Transparency ----------------------------Supported.                 
J2ME™ LWT support-------------------------Supported

 388
CLDC 1.0 and MIDP 1.0 compliant
Amount of storage for MIDlets -----------up to 1.4Mb
Java runtime memory ----------------------------- 700Kb.
Recommended Maximum MIDlet suite size --- 200Kb.
Maximum Record Store size ----------------------100 Kb.
Display available to MIDlets ---------------- 240x 276.
Color --------------------------------------------------4-level grayscale
Connection Interfaces------------HTTP, Socket, UDP, Serial port.
Maximum persistent connections---------------------- 4.
Supported image formats ---------------------------PNG.
Double Buffering ----------------------------- Unsupported.
Encoding Schemes ------------ Unicode, ISO8859_1, ISO10646, UTF-8.
PNG Transparency ----------------------------Supported.                 
J2ME™ LWT support-------------------------Supported

 V60i
CLDC 1.0 and MIDP 1.0 compliant
Amount of storage for MIDlets ---------------up to 1Mb (768K application +243Kb data)
Java runtime memory ----------------------------- 350Kb.
Recommended Maximum MIDlet suite si------- 50Kb.
Maximum Record Store size ----------------------100 Kb.
Display available to MIDlets ---------------- 96x 64.
Color --------------------------------------------------Black/White
Connection Interfaces--------------------------HTTP, Socket
Maximum persistent connections---------------------- 3.
Supported image formats ---------------------------PNG.
Double Buffering ----------------------------- Supported.
Encoding Schemes ------------ ISO8859_1, ISO10646.
PNG Transparency ----------------------------Supported.                 
J2ME™ LWT support-------------------------Supported

1. Q: Where can I download Motorola SDK for J2ME?
A: You can go to the following link to download 90 days trial version Metroerks Codewarrior IDE for Java from CMCC Java Contest web site or from below web site.  The Motorola SDK will in the directory: C:/ProgramFiles/Metrowerks/CodeWarrior/Java_Support/MotoSDK
2. Q: Is it possible to code a voice recorder and storing program using J2ME? Looking over MIDP, I find such functionality (voice input) does not exist. Does Motorola have a device specifice classes?
A: The os of Motorola Java enabled devices such as A388 runs standard CLDC/MIDP.  The only extended classes we provided now is LWT (light  Weight Toolkit) which utilizes User Interface.  Currently we don't have a device specifise classes on voice.

3. Q: I've downloaded LWT you provide for developing J2ME programs, and put in the derectory of lib/ for Sun's J2ME wireless toolkit. However, when I run the program, I can't see how the program will run on the Motorola's mobile phone but only some texts in the console window.
A: The LWT development tools provided here contain the class files and documentation needed to develop J2ME applications that use these features on LWT-enabled devices such as the Accompli 388. These tools do not allow LWT to be added to devices that do not already support it.
When you add LWT classes to a tool, it doesn't mean you are adding an emuloator for Motorola LWT enabled phone.  If you want to simmulate your applications in an Motorola phone such as A388 emulator, you can use Metrowerks CodeWarrior IDE, which you can download 30 days trial version from the following link, it contains A388 emulator.

4. Q: I have set up an OTA-server (based on win2000, orion) and are downloading MIDlets to an Accompli 388. It works fine for all but one of the MIDlets I have tested, of course that's the one we need to be able to download...  For this MIDlet the JAD file are downloaded and the information displayed on the phone. When I thereafter accept to download the JAR it responds 'Invalid OTA Server' and aborts. This MIDlet is possible to download via cable and the only difference that I can see from the others is that this is bigger (size of JAR is 70KB). Could that be a problem? Any other ideas?
A: There may be two factors that cause your installation failed:
1. The most files you can install in A388 is about 200 files.  When you exceed this number, your installation will fail.
2. The size of the jar file, we recommend not to exceed 100KB.  If you downloaded a compressed jar file, it will decompress into much bigger file when you install it. 

So when you download midlet to A388, please keep in mind about the file number and jar file size.  For your situation, it is hard to say if the failure is because of the jar size.  You may test it out using infrared installation instead.

100 KB is a recommended size.  It is hard to say what jar size is the exactly limit.  Normally 20-30 KB is good for installation on phone devices.  If the file can be download through cable, the size should be OK. 

5. Q: Is there any way to access the voice notes recordings using J2ME calls? In other words, can one write a J2ME program that accesss voice notes recordings and use them as the developer see fit (ex. sending them over to the net using https)? How about using VoiceXML? If not, is there any other way to send the voice data to the internet?
A: To my knowledge, There is no way to write an J2ME application to access/store voice notes.
6. Q: I am writing a J2ME program which try to display some images on the Accompli 6288 phone. When I conduct the testing and use the images(PNG format) from the demo programs provided by Sun Microsystem, it can display without any problem. However, when I replace the image with the one(also PNG format) produced by Photoshop, it cannot be display. I choose a JPEG image and saved it as PNG format. Does the J2ME in A6288 just handle a part of the PNG encoding?
A: A6288 supports 4 level Gray scale. You can use the numColors() method to determine the number of colors on your device.   Attempting to use color images on a grayscale device will greatly increase memory use, and significantly decrease performance.
7. Q:  Does J2ME for A6288 support socket, because I found it from the specification. If A6288 supports socket, in what way I can use it. Can you rovide me some samples?
A: A6288 supports socket.

Here is an example:

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class socketConn extends MIDlet implements CommandListener,  Runnable {
 private int state;
 private static final int STATE_SEND = 1;
 private static final int STATE_READ = 2;
 private Display display=null;

        String url = "socket://Your Server IP Address:Your Server Port";
private Thread thread =null;
StreamConnection c ;
InputStream is = null;
OutputStream os = null;
TextBox oTextBox;
 Command sendCommand = new Command("Send",Command.SCREEN, 1);
    Command readCommand = new Command("Read",Command.SCREEN, 1);

public socketConn()
        System.out.println("Inside Midlet Constructor...");
        display = Display.getDisplay(this);
 public void connect(){
       System.out.println("Making socket Connection ...");
          c = (StreamConnection);
          is = c.openInputStream();
          os = c.openOutputStream();
         }catch(ConnectionNotFoundException e){
8. Q: Can you confirm this for me and direct me to a copy of the OTA Provisioning Specifation for the Accompli 388.
A: Motorola Acommpli 388/6288 is the device supports OTA.  Here is the link the OTA spec. documentation:
9. Q:  I heard that Motorola's J2ME MIDP provides implementation for the StreamConnectionNotifier and StreamConnection Interface. If so, where can I download Motorola's J2ME implementation?

A:  The functions you are asking about are available in all J2ME CLDC/MIDP certified implementations including Motorolas.  The functions can be found in the CLDC specification. StreamConnection is defined in

We have been providing our J2ME implementation to Metrowerks for integration into CodeWarrior.  I believe it is available in CodeWarrior 6.0 and up.

Please visit our website for wireless information:
10. Q: how to transfer these data to a PC-application (e.g. for printing). The builtin applications (calendar etc.) do this by synchronizing with the  TrueSync software on a PC, but how can we achieve this from inside a MIDP- application?
A:  There is no way to transfer RMS data from phone to a PC.

For our GSM j2me enabled phone Accompli 388/6288, you can download j2me app. to the phone via IrDA, data cable, or OTA (Over The Air) download. If you want to download j2me app. via IrDA and data cable, you must have TrueSync software installed on your PC first, the TrueSync software comes with
the phone. For OTA download, you can type in the URL of a midlet and download it to the phone. An Installation screen will be shown after the download has been completed, you can then install it by following the screen instructions.

11. Q: We cannot get HttpConnection to work from a MIDP application on the Accompli 388. Network access is via GPRS. MIDlet runs fine and connects from any MIDP emulator. GPRS connection is also working fine from WML browser. The application just hangs on the device when it tries to make the connection. Also have tried reducing the size of data to be downloaded to only a few bytes but to no avail.

A: The Http connection runs slow on A388.  Try a URL that doesn't have too much contents that will make it faster to retrieve information.  Even with that it still takes several minutes.  You also can try using CSD to connect instead of using GPRS.  This way you can figure out if it is because the GPRS network traffic slows down the connection.

Please visit our website for wireless information:

12. Q: I'm trying to install a midlet than I'm developing on a Accompli A388, and after downloading it I always get the same error message: Instalation failed. That midlet works perfectly in several simulators as well as MIDP for Palm devices.  I downloaded others midlets that I have developed in the A388  and all of them work perfectly. Could you tell me what can I do? Where is the error? in the pplication manager? in my midlet? what exaclty?
A: First, I recommend you to check your manifest file.  Sometimes even missing a carriage return will cause the installation failure.  If you are sure about your manifest file, keep in mind for two restrictions for A388: First restriction will be the size of the app you try to install and the second is a restriction imposed by Motorola - the Accompli can
only hold about 200 files (according to their tech-support). Thus if you have a lot of files already installed on the phone and then download an application which increases the overall file number to over 200, you'll get an "Installation failure".
If the jar file size is too big, it will also cause installation failure. 

The Midlet may run perfectly in all kind of emulators.  But the real devices has memory and speed limitation.  That's why for these kind of limited devices, we need to keep the jar size as small as possible.
13. Q: I am developing a midlet and currently testing on an Accompli 388 and Nokia 9210. The Nokia 9210 is able to provide a console where System.outs can be displayed however the Accomplia 388 does not provide such functionality - or does but I just haven't found it. Could you please direct me to the methods in debugging midlets with the Accomplei 388.

A:Accompli 388 doesn't have the functionality for System.out.  That will need yourself to write some code in your program if you want to show some debugging information.  You can pass the error message to a StringItem then post it on the screen (i.e. Form).

14. Q: is there any way to force the Accompli to use an external modem/network connection instead of making phone calls as we are trying to debug an Internet midlet and it is rather costly and inconvenient.
A: There is no way to force Accompli 388 to use an external modem/network connection.  If you are trying to debug an internet midlet, should you really have to load it on the device (you can use some tools i.e. Codewarrior IDE to debug first).  Or you can choose GPRS as your network connection as long as the operator provide this service because GPRS connection service charges you by the amount of data transferred (how many bytes) instead of counting how long you've spent online.

J2ME Q&A -Programming




Q:请问388c, T720支持透明格式的PNG吗?


Q: 388c上中文默认的编码是什么?


Q:T720, 388c手机对声音支持如何?






Random r1=new Random();
int ib=r1.nextInt();



Q:我想在SCREEN中任意位置加入Command.OK,可不可以实现,好像直接用addCommand(new Command("3",Command.OK,0))不可以定位呀,或者有什么其它方法实现?
A:在Form中添加Command按钮,只能放在底端固定的位置,这一点是不能改变的。如果要让位置灵活,要在Canvas中自己画出指定位置,制定大小的按钮,这时不能用CommandListener来响应,必须通过KEY 或PointerPressed函数来响应用户动作,并且执行相关操作。




Q:不知道在TextArea中的setFont(Font font)是怎么设置字体,我看了一下Font的类,说什么它不能构造一个类,不知道是怎么设置!
A:在J2ME中,象TextField这样的高层UI API,不允许用户设定字体,这是由设备制造商设定好的。

c = (HttpConnection);
InputStream inStream = c.openInputStream();
int ch = 0;
while ((ch= != -1)
t = new TextBox("Http Text", b.toString(), 1024, 0);

Q:我想读取已经保存的数据,怎样的读取?但我用getRecordStore(int ID);没用的啊,只输出几个字符,该怎么办?
byte[] getRecord(int recordId)
Returns a copy of the data stored in the given record.
int getRecord(int recordId, byte[] buffer, int offset)
Returns the data stored in the given record

A:服务器端应该是http server,建议使用Servlet/jsp技术实现。 其中的结构必然是标准的三层结构,前面是J2me client,中间是 JSP/Servlet, 通过JDBC连接数据库后面的DB,如果不考虑client端的j2me结构,后台实际上就是一个web site.


Q:我准备在发送http post请求之前显示一个请等待的FORM页面,但就是没有显示,一定要等我的HTTP请求完成后才显示出来,为什么呢?这些操作是放在COMMAND的事件监听中的。




Vector CANdb++ Online Help 在这份教程的第一部分,我们提到没有CAN数据库,CANoe还不能工作。在第二部分,我们来看看CAN数据库是怎样的。通过CANoe的Too...
  • fz835304205
  • fz835304205
  • 2017年11月06日 16:54
  • 430


Intel低字节在前 Motorola高字节在前    在进行CAN总线通信设计或者测试过程中,经常看到CAN总线信号的编码格式有两种定义:Intel格式与Motorola格式。究竟...
  • bingdianlanxin
  • bingdianlanxin
  • 2014年11月26日 21:13
  • 9002

字节顺序(byte order)

  • njnu_mjn
  • njnu_mjn
  • 2013年06月20日 23:37
  • 2739

CAN报文 Intel 格式与Motorola 格式的区别

CAN报文 Intel 格式与Motorola 格式的区别
  • ppdyhappy
  • ppdyhappy
  • 2016年09月29日 11:24
  • 1879

CAN 报文信号编码规则 intel & motorola

当一个信号的数据长度不超过 1 个字节(8 位)时,Intel 与 Motorola 两种格式的 编码结果没有什么不同,完全一样。当信号的数据长度超过 1 个字节(8 位)时,两者的编码结果出现...
  • gocy123
  • gocy123
  • 2015年08月26日 10:32
  • 3470


遇到的看见的,长期更新~~~ 1.linux乱码问题     [root@vps software]# vi  /etc/sysconfig/i18n     LANG='zh_...
  • u010718976
  • u010718976
  • 2017年01月10日 11:00
  • 184

EGit /用户指南

EGit /用户指南 EGit 内容 1 开始 1.1 概述1.2 基本教程:项目添加到版本控制中 1.2.1 " 配置 1...
  • jibaole
  • jibaole
  • 2016年01月23日 19:33
  • 2046


数据库学习FAQ 简述数据、数据库、数据库管理系统、数据库系统的含义及其联系?数据:数据是信息的符号记录。数据是数据库处理和研究的对象 数据库:长期存储在计算机内,有组织、可共享的数据集合。数据按一定...
  • pupilxmk
  • pupilxmk
  • 2016年05月25日 08:59
  • 471


  • lsh000111
  • lsh000111
  • 2017年04月11日 08:43
  • 467


本文目的:在linux里装Skyeye,用Skyeye模拟ARM7DTMI,运行uClinnux-2.4.x SkyEye可以做什么事情? 1. 通过SkyEye可以帮助促进嵌入式系统的学习,在不...
  • benjaminwan
  • benjaminwan
  • 2013年06月18日 18:15
  • 1474