【正文】
K 主程序與模擬器外觀。 J2me 數(shù)字簽名: 得到一個(gè)證書后就可以對(duì) j2me 的 jad 文件進(jìn)行簽名。這里有一些與簽名相關(guān)的需要注意的一些問題。 1. 想要安裝簽過名的軟件,就必須通過 jad 來安裝。我們知道 j2me 程序生成后會(huì)有 jad 和 jar 兩個(gè)文件,一般情況下我們只需要安裝 jar 文件就可以了。例如我會(huì)將 jar 文件通過藍(lán)牙傳到手機(jī)上,再進(jìn)行安裝。但如果想通過手動(dòng)安裝簽過名的文件,就要通過 jad 來安裝,而且要確保 jad 和jar 文件是在相同目錄下。我的做法是通過數(shù)據(jù)線將兩個(gè)文件拷入手機(jī)的內(nèi)存或存儲(chǔ)卡上,然后通過 jad 來安裝,這樣安裝好的軟件就是簽過名的軟 件了。不會(huì)再有總是很煩人的詢問用戶是否允許操作的提示信息。但就我看過的手機(jī)看來,應(yīng)該是不同的手機(jī)有不同的表現(xiàn)。例如索愛的手機(jī)關(guān)于提示仍然是需要用戶自己設(shè)置的。諾基亞也是。只是諾基亞的在使用非簽名軟件時(shí)用戶無法設(shè)置為“總是允許”或“只提示一次”。而簽了名的就可以設(shè)置了。 2. 編程人員需要注意,像很多功能在未簽名前是可以使用的,例如 gps,網(wǎng)絡(luò)連接,文件讀寫等。 3. 簽過名的軟件有什么好處。簽名就是告訴我們這個(gè)軟件是可信的,對(duì)用戶最直接的感受就是聯(lián)網(wǎng)或訪問手機(jī)文件的時(shí)候,收發(fā)短信,彩信,藍(lán)牙等,但簽名后這些功 能 就部可用了。這就是 jad 中 MIDletPermissions 屬性的問題。當(dāng)未簽名時(shí)對(duì)這個(gè)屬性的要求并不嚴(yán)格,但簽名后就一定要注意。必須把所要使用到的權(quán)限加入進(jìn)去,否則這個(gè)功能就不能使用了。如下是一些常用的 MIDletPermissions 屬性。 本地文件和個(gè)人信息 : J2ME Wireless Toolkit 支持 JSR 75,即 PDA Optional Packages for the J2ME Platform,它也包括兩個(gè)獨(dú)立的 API: FileConnection API 提供了 MIDlet 對(duì)設(shè)備上本地文件系統(tǒng)的訪問。 Personal Information Management (PIM) 可選軟件包包括用于操縱聯(lián)系人列表、日程安排和計(jì)劃列表的 API。 一臺(tái)真實(shí)的設(shè)備可能有一個(gè)能通過使用 FileConnection API 訪問的本地文件系統(tǒng)。在 J2ME Wireless Toolkit 模擬器中,模擬的文件系統(tǒng)作為硬盤上的一個(gè)目錄存在。應(yīng)用程序使用 FileConnection 可訪問的文件都存放在子目錄toolkit\appdb\skin\ filesystem中 ,此 處 toolkit 是 J2ME Wireless Toolkit 的安裝目錄, skin 是模擬器皮膚的名稱。例如, DefaultColorPhone 模擬器皮膚隨安裝根 root1 而產(chǎn)生,包含一個(gè) Readme 文件文件的完整路徑為toolkit\appdb\DefaultColorPhone\filesystem\root1\Readme。 您可以從模擬器窗口的菜單種選擇 MIDlet External events 來管理可用的根目錄。您將看到一個(gè)添加和刪除根目錄的小的實(shí)用程序窗口。這些 操作也將為 registered listener 對(duì)象生成事件。 在真實(shí)的設(shè)備上,個(gè)人信息可能以專有格式存儲(chǔ)在內(nèi)存中。模擬器使用硬盤中的一個(gè)目錄來存放這些信息,可使用 PIM API 來訪問。所有的信息存儲(chǔ)在 toolkit\appdb\pim 目錄中。列表存儲(chǔ)在聯(lián)系人、事件和計(jì)劃目錄的子目錄中。例如,聯(lián)系人列表 Contacts 位于 toolkit\appdb\pim\contacts\Contacts 目錄中。 在列表目錄內(nèi),列表項(xiàng)以 Inter Mail Consortium 指定的 標(biāo)準(zhǔn)格式存儲(chǔ)。聯(lián)系人以 vCard 格式存儲(chǔ),日歷和計(jì)劃項(xiàng)都以 vCalendar 格式存儲(chǔ)。 J2ME Wireless Toolkit 不僅僅是一個(gè)出色工具的增量更新。它包括了對(duì)令人激動(dòng)的四項(xiàng)新規(guī)范的支持,同時(shí)定義了六種新的 API。隨著無線 Java 技術(shù)世界的快速發(fā)展, J2ME Wireless Toolkit 緊緊跟隨發(fā)展的步伐并且包含您所需的全部工具。 附件 2:外文原文 Mobile application platformJ2ME profile 1. what is the J2ME J2ME (Java 2 Micro Edition) is a Java 2 as an integral part of it with J2SE, J2EE said. According to Sun39。s definition: J2ME is a highly optimized Java runtime environment, mainly for consumer electronics devices such as cellular phones and video phones, digital settop boxes, car navigation systems and so on. J2ME technology in 1999, the JavaOne Developer Conference on the formal launch of the General Assembly, which will of the Java language and platformindependent features into a small electronic device that allows mobile wireless devices sharing between applications. J2ME in its design specifications, to follow a variety of devices to create a single development system is meaningless the basic principles. So first of all J2ME embedded devices generally divided into two types: One is the limited puting, power supply is also limited embedded devices (for example, PDA, cell phone)。 another kind of puting power is relatively better, And in the power supply is relatively sufficient for embedded devices (for example, air conditioners, refrigerators, TV settop boxes (settop box)). Because these two types of embedded devices, Java is why the introduction of a concept called Configuration, and then the operation of the above features are limited, limited the power of the device embedded in the definition of Connected Limited Device Configuration (CLDC) specifications are。 and the other one To standardize the types of devices are Connected Device Configuration (CDC) specifications. In other words, J2ME first of all embedded devices using the Configuration concept of separate into two kinds of abstract patterns. In fact, everyone here can be a Configuration for J2ME two types of specifications for embedded devices, which defines the specifications of these devices at least in line with the puting power and capacity of power supply,