J2ME configuration

xiaoxiao2021-03-06  42

1, software preparation (placed in studyjava / Soft directory) J2SDK-1_4_2_06-windows-i586-p-iftw.exe // JDK 1.4.2 version J2ME_Wireless_Toolkit-2_2-windows.exe //j2wt2.2 is mainly class Library J2SDK-1_4_2_06-windows-i586-p.exe // JDK 1.4.2 language package Eclipse-sdk-3.0-win32.zip // Eclipse 3.0 version EclipseMe.Feature_0.6.1_site.zip // Eclipseme 0.6.1 plugin 2 , Installing 2.4.2, first installing JDK1.4.2, remember to join the path in the environment variable path after installation. 2.2 Install J2ME_Wireless_Toolkit, no problem 2.3 Unzip Eclipse, do not need to be installed, you can run, first run, prompt you to choose Workspace path 2.4 Install the Elipseme plugin, pay attention to the installation method, run elipse, help-> updates-> FIND AND INSTALL-> know the path where the plugin is located. . . Installation. . . . 3, you can see J2ME in Window-> Preferencees running on the menu, click to find something you can, what can be used to see DOCS / INDEX.html inside Eclipseme. Next we can check out J2ME Ciew's Windows-> show views-> Other Select J2ME to see the View of J2ME Platform Components. There are four items, Wireless Toolkits,

Platform Definitions, Profiles, Configurations. Right-click WiReless Toolkits Add WTK In the Directory of WTK, Select WTK Directory: Discover the J2WT self-contained examples are very enjoyable 4, test 4.1 Establishment project: Select File-> New-> Others- > J2ME -> J2ME MIDLET Suite, enter the project name 4.2 creation file: Select File-> New-> file, enter the file name 4.3 Enter the code: import javax.microedition.midlet. *; Import javax.microedition.lcdui. *;

Public class hello extends midlet {

Private display display;

Public Hello () {Display = display.getdisplay (this);}

Public void startapp () {textbox t = new textbox ("Hello MIDET", "Hello Midp!", 256, 0); Display.SetCurrent (T);}

Public void pauseapp () {}

Public void destroyApp (boolean unconditional) {}}

4.4 Running Run-> Run Run: A mobile screen appears, showing the Hello MIDP! 4.5 test success, the environment is completed

转载请注明原文地址:https://www.9cbs.com/read-79078.html

New Post(0)