⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 200603091545555.html

📁 软件工程的红包书
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html>
<head><title>J2ME</title></head>
<center><h1>J2ME</h1></center>
<div><P align=right><FONT face=Verdana><FONT color=#f70938><FONT face=黑体><a href="200604112229525.html" tppabs="http://www.itisedu.com/phrase/200604112229525.html" target="_new">中科永联</a>高级技术培训中心(</FONT><FONT face=黑体>www.itisedu.com</FONT><FONT face=黑体>)<IMG src="2006327215526989.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/2006327215526989.jpg" border=0></FONT></FONT></FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="200603091545555.html" tppabs="http://www.itisedu.com/phrase/200603091545555.html" target="_new">J2ME</a>(Java 2 micro Edition)是一种高度优化的<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200604241413225.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200604241413225.html'" tppabs="http://www.itisedu.com/phrase/200604241413225.html" target="_new">Java运行环境</a>,针对市面上的大量消费<a href="200603090857555.html" tppabs="http://www.itisedu.com/phrase/200603090857555.html" target="_new">类</a>电子设备,例如Papers、cellularphones(蜂窝电话), screen-phones(可视电话?)、digital set-top boxes(数字机顶盒)、car navigation systems(汽车导航系统)等等。 J2ME技术在1999年的<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200605102253145.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200605102253145.html'" tppabs="http://www.itisedu.com/phrase/200605102253145.html" target="_new">JavaOne</a> Developer Conference大会上推出。J2ME技术将Java语言的与平台无关的特性移植到小型电子设备上,允许移动无线设备之间共享应用<a href="200604232224305.html" tppabs="http://www.itisedu.com/phrase/200604232224305.html" target="_new">程序</a>。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; J2ME就是Java 2 micro Edition的缩写,是sun的java 2 的三大成员之一(J2SE,<a href="200603091447335.html" tppabs="http://www.itisedu.com/phrase/200603091447335.html" target="_new">J2EE</a>,J2ME)。专门用于开发消费性电子产品。例如手机,PDA等。</FONT></P>
<P><FONT face=Verdana><STRONG>一、J2ME平台<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200603122156385.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200603122156385.html'" tppabs="http://www.itisedu.com/phrase/200603122156385.html" target="_new">体系结构</a></STRONG></FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; J2ME并不是一种产品,而是一种技术,J2ME包括两种<a href="200603051002565.html" tppabs="http://www.itisedu.com/phrase/200603051002565.html" target="_new">类型</a>的<a href="200603302222545.html" tppabs="http://www.itisedu.com/phrase/200603302222545.html" target="_new">组件</a>,即配置(configuration)和简表(profile)。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>配置(configuration)</STRONG>是一系列低层次的<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200604241228185.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200604241228185.html'" tppabs="http://www.itisedu.com/phrase/200604241228185.html" target="_new">API</a>(<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200604111116455.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200604111116455.html'" tppabs="http://www.itisedu.com/phrase/200604111116455.html" target="_new">应用编程接口</a>)和一种为该族设备优化的虚拟机。今天在用的一般配置有两种,连接的设备配置(CDC)和限制连接的设备配置(<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200605041045465.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200605041045465.html'" tppabs="http://www.itisedu.com/phrase/200605041045465.html" target="_new">CLDC</a>)。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDC提供了一种虚拟机,以及支持像灵敏发报机、寻呼机、个人数字助理(PDA)和电视机顶盒这样的设备上的Java应用的基类库。这些设备的典型特征是具有一个32位的处理器和用来支持虚拟机和类库的超过2MB存储容量。CVM虚拟机正好满足了它们对于Java 2虚拟机特征集的功能<a href="200603101518295.html" tppabs="http://www.itisedu.com/phrase/200603101518295.html" target="_new">需求</a>。这是在小型平台上全特征的虚拟机。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLDC提供一个适合于小型的、资源受限的、连接的设备上使用的标准Java平台。这些设备的典型特征是具有一个16位或者32位的处理器和用来支持虚拟机和类库的160KB到512KB的总内存,它们通常以电池作为电源,并联入某类网络中,联网一般使用带宽时常小于9600bps的无线的、断断续续的连接方式。CLDC的核心是<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200605041111155.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200605041111155.html'" tppabs="http://www.itisedu.com/phrase/200605041111155.html" target="_new">K虚拟机</a>(<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200604281054255.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200604281054255.html'" tppabs="http://www.itisedu.com/phrase/200604281054255.html" target="_new">KVM</a>)。“K”标记反映了它们的大小是以kilobytes(千字节)衡量的这一事实。CLDC的特征也是包含一系列类库。</FONT></P>
<P><FONT face=Verdana>  CDC的硬件参数:</FONT></P>
<P><FONT face=Verdana>  ·2M以上内存。<BR>  ·具有网络连接能力,通常为无线网络。 <BR>  ·需要实现<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200604261004365.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200604261004365.html'" tppabs="http://www.itisedu.com/phrase/200604261004365.html" target="_new">java虚拟机</a>规范的全部功能。<BR>  ·32位或者64位的处理器。</FONT></P>
<P><FONT face=Verdana>  CLDC的硬件参数:</FONT></P>
<P><FONT face=Verdana>  ·512 KB 以下内存 <BR>  ·有限能源供应(通常使用电池)<BR>  ·有限或非持续网络连接 <BR>  ·简单的用户界面<BR>  ·16位或者32位的处理器</FONT></P>
<P><FONT face=Verdana>  从上述的标准中我们不难看出CLDC主要针对那些资源非常受限的设备比如手机、PDA、双工寻呼机等。而CDC主要面对那些家电产品,比如机顶盒、汽车导航系统等。简表是以配置为基础的,例如Mobile Information Devices Profile(<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200605041122175.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200605041122175.html'" tppabs="http://www.itisedu.com/phrase/200605041122175.html" target="_new">MIDP</a>)就是CLDC上层的重要简表。与配置的纵向特性不同的是,简表是横向的。下图是J2ME体系结构的框图:</FONT></P><FONT face=Verdana>
<P><IMG src="200639154514240.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/200639154514240.jpg" border=0><BR>&nbsp;&nbsp;&nbsp; J2ME体系结构框图 </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>简表(profile)</STRONG>是一种说明,它详细描述了<a href="200604241328115.html" tppabs="http://www.itisedu.com/phrase/200604241328115.html" target="_new">架构</a>在配置之上并使用配置的一系列API。简表的一个例子是创建在CDC之上的基础描述(Foundation Profile),它为以像住宅网关、灵敏电话和双向寻呼机这样的设备为目标的应用提供完整的J2ME运行时环境。另一种简表是<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200605041119555.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200605041119555.html'" tppabs="http://www.itisedu.com/phrase/200605041119555.html" target="_new">移动信息设备描述</a>(MIDP),它构建在CLDC之上,为那些运行在像移动电话和登录级PDA这样的设备上的应用提供完整的J2ME运行时环境。MIDP致力于解决像用户界面、持久存储、联网和应用程序生命周期这样的问题。</P>
<P><STRONG>二、J2ME 目标设备</STRONG> </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 使用 CLDC 开发的 J2ME 应用程序的目标设备通常具有以下特征: </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 可供 Java 平台使用的 160 到 512 千字节的总内存 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 功率有限,常常是电池供电 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 网络连通性,常常是无线的、不一致的连接并且带宽有限 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 用户接口混乱,程度参差不齐;有时根本就没有接口 </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一些 CLDC 支持的设备,包括无线电话、寻呼机、主流个人数字助手 (/pda/ PDA),以及小型零售支付终端。 </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 依照 Sun Microsystems,CDC 的目标设备通常具有以下特征: </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 使用 32 位处理器 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 2 兆字节或更多可供 Java 平台使用的总内存 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 设备要求的 Java 2 “蓝皮书”虚拟机的全部功能 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 网络连通性,常常是无线的、不一致的连接并且带宽有限 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; · 用户接口混乱,程度参差不齐;有时根本就没有接口 </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一些 CDC 支持的设备,包括常驻网关、智能电话和通讯器、PDA、管理器、家用电器、销售网点终端以及汽车导航系统。 </P>
<P><STRONG>三、J2ME、J2SE与J2EE之间的比较</STRONG></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 下面的图表描述了支持 J2ME 应用程序的设备,同时说明了 J2ME 适合 Java 平台之处:&nbsp;<BR>&nbsp;<IMG src="200639154550912.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/200639154550912.jpg" border=0><BR><STRONG>四、J2ME开发工具</STRONG> </P>
<P>1)、J2MEWTK,这个工具在前文已经提到过,它是最基本的J2ME程序开发工具,免费,体积小,速度较快,完全遵守J2ME的各种规范。具有简单的<a href="200604261459505.html" tppabs="http://www.itisedu.com/phrase/200604261459505.html" target="_new">IDE</a>界面,易于上手,开发十分方便快捷,可以和 Forte 3.0捆绑。J2MEWTK适用于初学者和已经达到很高水平的开发者。窃以为J2MEWTK+<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200604181646475.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200604181646475.html'" tppabs="http://www.itisedu.com/phrase/200604181646475.html" target="_new">JDK</a>+Editplus/UltraEdit是绝配。 </P>
<P>2)、VisualAge Micro Edition 1.4。这是IBM的产品,号称是J2ME开发领域的TOP 1,但是我用了半天,也没有看出好在那里。马上就删除了。窗口太复杂,不明所以,开发起来很难适应,速度和J2MEWTK一样,比较庞大,装了这个东西,你的C盘就要小心了,多了很多乱七八糟的<a href="200602282323195.html" tppabs="http://www.itisedu.com/phrase/200602282323195.html" target="_new">文件</a>,还注册了许多COM组件,典型的非绿色<a href="200604232134205.html" tppabs="http://www.itisedu.com/phrase/200604232134205.html" target="_new">软件</a>。 </P>
<P>3)、CodeWarrior for Java 6.0。这是Motolola的产品,功能十分强大,集成度很好,开发,调试,发布J2ME程序都很方便(还可以做一般的Java Program)。它的IDE和Visual Studio十分相似,很容易上手。CodeWarrior比较适合中等水平的开发者的使用。不过CodeWarrior不是免费软件,你只能够免费使用30天。 </P>
<P>4)、Borland Jbuilder 5.0的Nokia Bobile版。</P>
<P><FONT face=Verdana><STRONG>五、J2ME开发步骤</STRONG></FONT></P>
<P><FONT face=Verdana>1. 系统要求 <BR>v Pentium 100以上CPU <BR>v 64MB 内存 <BR>v Windows NT Workstation 4.0(Service Pack 3)或Windows 98 <BR>v 6 MB自由硬盘空间 <BR>v Java 2 SDK, Standard Version, 版本1.2.2或者更高 <BR>2. 安装Java 2 SDK <BR>在使用Motorola SDK之前必须安装JDK,Standard Edition。 <BR>请从 http://java.sun.com/products/jdk 下载JDK,并按照Sun的指导安装到PC中。 <BR>3. 安装Motorola SDK <BR>安装之前请先卸载以前版本的Motorola SDK: <BR>1. 选择"开始à设置à控制板" <BR>2. 选择"添加/删除程序" <BR>3. 查找到"Motorola SDK Components for the J2ME Platform" </FONT></P>
<P><FONT face=Verdana><STRONG>六、</STRONG></FONT><FONT face=Verdana><STRONG>一个样本应用程序:电话日历</STRONG></FONT></P>
<P><FONT face=Verdana>J2ME 的著名特色之一是它在受限环境中的日期处理功能。J2ME 提供的 DateField UI 元素是一个可编辑的组件,该组件用于表示日历信息(即日期和时间)。在这一部分中,我们将使用 DateField 和 Date 函数来开发一个 J2ME 应用程序,这个应用程序用于在移动电话 UI 上显示一个滚动日历。</FONT></P>
<P><FONT face=Verdana>一个电话日历应用程序 </FONT></P><FONT face=Verdana>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -