【正文】
圖 15. 實。如果您將鼠標放在紅線上,編輯器會顯示一個解釋框,告訴您為什么它認為這是一個錯誤。 TutorialMidlet 類使用 WeleScreen 和 HelloScreen 類,這些類您也必須鍵入。[10][8][6][4] } } } } else if (c == backCommand) { (weleScreen)。 } else if (c == clearCommand) { ()。 (name)。 } protected void pauseApp () { // Do nothing } protected void destroyApp (boolean unconditional) { notifyDestroyed ()。 (this)。 (exitCommand)。 (this)。 (greetCommand)。 backCommand = new Command (Back, , 1)。 exitCommand = new Command (Exit, , 0)。 // instantiate the internal variables public TutorialMidlet () { display = (this)。 WeleScreen weleScreen。 Command clearCommand。 Command greetCommand。import .*。package tutorial。所有用戶生成的軟鍵(softkey)事件(比如用戶按下一個軟鍵時)都由 TutorialMidlet 類處理,因為它實現(xiàn)了 CommandListener 接口,并將自己作為所有屏幕對象的命令監(jiān)聽程序附加到該接口上。Java 運行時環(huán)境(Java Runtime Environment,JRE)首先會實例化這個類,然后調(diào)用其 startApp() 方法啟動 midlet。 從該向?qū)е猩傻闹饕?Java 源代碼文件如下所示:圖 14. 生成的源代碼 TutorialMidlet 類s Suite for J2ME中提供了一個向?qū)?,但我更喜歡使用 Eclipse 的默認向?qū)В驗樗С殖惡鸵褜崿F(xiàn)接口的自動代碼完成(automatic code pletion)。Eclipse 的新的類向?qū)10][8][6][4]圖 12. 在 Package Explorer 中查看 這個類庫包含 J2ME API 類和 Nokia 的實現(xiàn)類。源代碼目錄和類庫是項目名下的一個級別。 現(xiàn)在,您已經(jīng)結(jié)束了項目的安裝。否則,MIDlet 會在您在設備上部署這些庫的時候拋出“Class not found”異常??梢詫⑷我馔獠繋焯砑拥筋惵窂街小?圖 10. 構(gòu)建路徑中的源文件夾 您可以在項目中指定放置 Java 源文件和編譯好的類文件的地方。[10][8][6][4] 圖 8. 創(chuàng)建項目名 4. 如果有一些 SDK 可用的話,選擇一個 SDK 進行開發(fā)。 2. 選擇 Nokia J2ME 的項目類型。 ... [9][7][5][3]現(xiàn)在,讓我們來經(jīng)歷一下使用這些工具構(gòu)建、測試和部署 MIDP 應用程序的完整過程。圖 6. 日志級別 可以在 MIDP Monitor 選項卡中指定仿真器的日志級別。 MIDP 的運行時屬性(比如堆的大小和安全域)也可以配置。這兩個仿真器實例可以使用這些電話號碼彼此發(fā)送 SMS/MMS 消息。 Phone Number prefix 字段指定了模擬電話網(wǎng)絡環(huán)境時為仿真器分配的假的電話號碼。您就能夠設置該仿真器的一般屬性。 2. 從下拉列表中選擇 SDK 仿真器。配置仿真器要配置設備仿真器的行為,請執(zhí)行以下操作: 1. 選擇 Tools Nokia Developer39。 ... [9][7][5][3] 圖 3. 選擇 SDK 的安裝目錄 2. 單擊 Add 將新的 SDK 添加到下拉列表中。為了做到這一點,需要執(zhí)行以下步驟:1. 選擇 Tools Nokia Developer39。s Suite 中您可能必須手工將新的 SDK 添加到 Nokia Developer39。SDK 通常安裝在 Windows PC 的 C:\Nokia\Devices\ 目錄中。您可以從位于 。 Series 60 MIDP Concept SDK beta , Nokia Edition s Suite for J2ME 是隨同以下設備 SDK一起提供的:s Suite for J2ME 菜單項和一個新的圖標編號。啟動 Eclipse在獲得提示的時候,應該選擇將該套件與 Eclipse 集成。s Suite for J2ME 版本。s Suite Version for J2ME安裝的時候需要這個序列號。s Suite for J2ME Version 及其更高版本都支持 Eclipse 集成。s Suite for J2ME,網(wǎng)址是 (本網(wǎng)站的下載專區(qū)也提供下載)。s Suite for J2ME[10][8][6][4]s Suite for J2ME 為安裝在開發(fā) PC 上的所有 SDK 提供了一個管理接口.該 SDK 也正是您在本教程中要用到的 SDK。因此,它只為有代表性的設備發(fā)布 SDK。SDK 是開發(fā)實際設備應用程序的一個重要工具。 設備 SDK 包含可用的 Java API 庫,以及用于特殊設備的 PC 仿真器。它們還提供了對 Bluetooth API、Mobile 3D API、File I/O 和 PIM API 的可選支持。 J2ME 在所有的 Nokia 開發(fā)人員平臺上都受到支持。目前還沒有使用 Series 90 平臺的商業(yè)設備。 Nokia Series 60 Developer Platform 適用于基于 SymbianOS 的智能電話設備,比如 Nokia 3650 和 6600。它擁有最大的市場份額,每年可銷售 1 億部 Series 40 設備。 為了讓開發(fā)人員活得輕松點,Nokia 只圍繞幾種開發(fā)人員平臺設計它的手機。因為研究每個設備的特征以及可在每個設備上使用的編程環(huán)境要花費大量的時間。 作為世界上最大的移動電話制造商,Nokia 隨時都會生產(chǎn)出幾十種手機模型。s Suite for J2ME。移動電話開發(fā)人員需要一個低成本的 Eclipse 插件,支持手機制造商提供的真實設備 MIDP SDK。 Studio Device Developer(Device Developer)一直是支持 J2ME 開發(fā)的惟一基于 Eclipse 的 IDE。對于移動電話開發(fā)人員,Eclipse 的威力一直讓人捉摸不定,直到最近,這種情況才得以改觀。但更重要的是,Eclipse 支持允許第三方供應商在其上構(gòu)建專用工具(插件)的應用程序平臺。 開源 Eclipse IDE 已經(jīng)成為供許多 Java 開發(fā)人員選擇的開發(fā)工具之一。Eclipse 和 J2ME 的基礎知識將幫助您完成本教程描述的任務。盡管 Nokia Developer39。 本教程是為那些有興趣利用功能強大的 Eclipse IDE 提高生產(chǎn)率的 J2ME 和 Nokia 開發(fā)人員準備的。s Suite for J2ME 為 Nokia 手機開發(fā) J2ME 應用程序。s Suite ,希望讀者注意.關于本教程 編者注:在論壇上看到很多朋友都在問關于在eclipse中配置Nokia Developer39。評論:s site.Last edited by smartss。m using the device Prototype_4_0_Nokia_7710_640x200_MIDP_Emulator which is default. After I emulate, on the emulator, when i select the midlet name, it doesnt show me anything further. And i cant go back to midlet name either. What could be the problem? please help! I39。 Re: Please HELP. Impossible Eclipse + 20070321 Re: Please HELP. Impossible Eclipse + 20061215 Re: Please HELP. Impossible Eclipse + 20061212m glad I found this thread before I got mad I think that it all happens because you start Eclipse in one location first and then move the whole thing to another location. It has then already written some paths to it180。 Re: Please HELP. Impossible Eclipse + 20061103 Re: Please HELP. Impossible Eclipse + 20060302 Re: Please HELP. Impossible Eclipse + 2006030201:21 6 videador View Profile View Forum Posts View Articles Registered User Join Date Feb 2006 Posts 8 Hi againIve did same steps with Eclipse and have these files on /pluginsAnd sure that ive select correct folder. Because as you say, these files are here by i select correct option.Now, im trying with netbeans. I hope that dont need Netbeans Mobility Pack because looks only available for version . 191。00:00 5 hartti View Profile View Forum Posts View Articles Forum Nokia Champion Join Date Apr 2003 Location USA, CA Posts 6,703 I installed the tools the same way. The only difference in the folder structure is that in \eclipse\plugins I have 5 ... folders. The one missing from your list is Do you have this folder too?As you seem to have most of the stuff in the \eclipse folder I am guessing you selected that folder during the Carbide installation, so I am not going to even ask about it :)Reply With Quote 20060301 at 23:40. Reply With Quote what mean of correctly configured? Please. 191。Are there correct these steps?I havent worked never with java. I have S60 terminal and want do a simple game first for learn, i have now a piece of code for test in my terminal and need use nokia api. And this looks good way for do it.191。Tools39。39。 Re: Please HELP. Impossible Eclipse + 20060301 Re: Please HELP. Impossible Eclipse + 2006030114:06 2 pillar View Profile View Forum Posts View Articles Regular Contributor Join Date Feb 2006