J2ME学习笔记

 J2ME handnotes



##################3

Concept of J2ME



J2ME is a solution for mobile platform, for example mobile phone, pda,etc.

It defines the specification of application and development.



J2ME is one of the solutions for mobile, the others are Brew,sybian,etc.



The different between J2ME and others is it includes the JVM, you can write the code once,

and run anywhere.



####################

Structure of J2ME





Opitional Package

Profile

Configuration

Virtual Mechine

Operation System





################

Life Periods of J2ME Application



Several states:start, active, paused, destoryed

The methods causes the top states:startApp(),pauseApp(),destoryApp(boolean unconditional)



##############

A simple sample of J2ME Application



import javax.microedition.midlet.*;

import javax.microedition.lcdui.*;



public class Ssample extends MIDlet{

private Display display;

//构造函数

public Ssample(){

display = Display.getDisplay(this);

System.out.println("Constructor");

}

protected void startApp(){

System.out.println("startApp is called.");

Form f = new Form("HelloTest");

display.setCurrent(f);

}

protected void pauseApp(){

System.out.println("pauseApp is called.");

}

protected void destroyApp(boolean unconditional){

System.out.println("destroyApp is called.");

}

}



#######################

CLDC (connected limited devices configuration)



CLDC is one of the importent configurations on J2ME platform.

It defines the Virtual Machine and the mininum core class libraries.

The mininum core class libraries includes the following packages:

java.io

java.lang

java.util

javax.microedition.io

Notes:

CLDC only inclues the javax.microedition.io package, other packages,

such as javax.microedition.midlet, are definded by Profiles(MIDP).

So CLDC can't implement the functions, such as UI,Events,etc,

it's the job of Profiles.


--未完待续
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值