J2ME Development Environment Installation Guide

Source: Internet
Author: User
Tags command line
In order to develop the J2ME, we must first establish the development platform, and in the development of platform selection, there are four kinds of programs.



Borland JBuilder platform with complete function (recommended)

To build this platform, we must install: JBuilder 7, JBuilder 8 or JBuilder 9,borland Mobileset 3.1. Optional materials are: (Note that these are not necessary, you can also do the development) you want to develop the phone SDK, such as the development of Nokia must be prepared Nokia DEVELOPER ' S SUITE, but also according to their own needs to add some simulator such as 7210.

With more than enough material, we can build a very good development platform.

Build steps:

(1): Install JBuilder, and register. (If JBuilder 9.0 is installed and is fully installed, you do not have to install Mobileset 3.1, you can skip to step 3)

Note: The JBuilder installation directory name cannot contain spaces (such as: cannot be installed in the Program Files directory because there are spaces in the middle), preferably installed in the default directory. JBuilder not because of the space problem, and so on the next installation Mobileset 3.1, to the end will be due to space problems.

(2): The correct installation of JBuilder, and successful registration, installation Mobileset 3.1, after the installation is completed, the need to register, Mobileset is free, you can ask Borland for the registration code, you can also use Appendix 2 registration code.

Note: Install Mobileset 3.1 with a custom (custome) installation, and the second item (Retroguard obfuscator) is not selected at installation time.

(3): After completing the 2 steps required, you can install the developer ' S Suite and simulator (NOKIA SDK installation method see Appendix 1).

(4): The correct completion of the above steps, you can say that this platform has been completed, it is so simple, the following you have to do is a new project in the JBuilder, in the form of the JDK selected J2ME, the other use the default on it, complete the configuration, then select New, At this point, the two options in the final MIDP page should be optional, and then you can develop them.



Second, the use of sun company official tools, wireless development platform J2me_wireless_toolkit

To build this platform, we must install the following: jdk1.4,j2me_wireless_toolkit1.04 or J2me_wireless_ toolkit2.0 Optional materials are: (Note that these are not required, you can develop without these) you want to develop the phone SDK, for example to develop on Nokia must be prepared Nokia DEVELOPER ' S SUITE, You can also add some simulators, such as 7210, according to your needs (NOKIA SDK installation method see Appendix 1).

With more than enough material, we can build the present platform.

(1): First install jdk1.4, (in method one because JBuilder with JDK so do not need to install separately.) )

(2): The correct installation of JDK, you can install J2me_wireless_toolkit, whether 1.04 or 2.0, can be, 2 can also be installed.

(3): After completing the 2 steps required, you can install the developer ' S Suite and simulator (NOKIA SDK installation method see Appendix 1).

(4) correctly completed the above steps, it can be said that the platform has been built (J2me_wireless_toolki role and JBuilder almost, used to compile your written Java program, but it does not provide editing and other functions, So you have to use Notepad or other text editing software to write the program, use the method see Appendix 3



Forte for Java+j2me_wireless_toolkit with Sun integrated development environment (recommended)

To build this platform, we must install: Java2 SDK (Java2 Standard Edition), Fore for Java Community Edition, j2me_wireless_toolkit1.03 optional materials are: (Note that these are not necessary, and you can develop without them) you want to develop the phone SDK, for example, to develop Nokia DEVELOPER ' S SUITE in the development, you can also add some simulators, such as 7210, according to your needs (Nokia The SDK installation method is shown in Appendix 1.

With the above materials, we will build the present platform.

(1): First install Java2 SDK (Java2 Standard Edition).

(2): After installing the SDK correctly, you can install fore for Java Community Edition.

(3): Complete the above 2 steps must step, you can install j2me_wireless_toolkit1.03 (Note when installed to choose the installation mode, is "integrated"----integration, or "Alone"----Independent, select " Integrated "----integration).

(4): After completing the 2 steps required, you can install the developer ' S Suite and simulator (NOKIA SDK installation method see Appendix 1).

(5) Completes the above steps correctly, this platform constructs completes (Fore for Java Community edition function and JBuilder almost)



Four, smallest, but more complex to use the platform CLDC+MIDP

To build this platform, we must install: JDK1.4,J2ME_CLDC_ 1.04,MIDP 2.0

The use of this platform is more complex, only a rough introduction:

(1) Also first to install jdk1.4

(2) The J2ME_CLDC_ 1.04,MIDP 2.0 reconciled to the same directory as C:\j2me under, in fact, the two are in the command line of the compiler and the role of Jbuilder,toolkit, but with more trouble.

(3) Detailed use of the method see Appendix 4



Appendix 1:nokia SDK Installation

After loading JBuilder (in fact, to see if there is a jdk,jbuilder with JDK) or JDK, the Nokia developer ' s Suite can be installed to install the Developer ' suite rear simulator, Be sure to install it in the device directory of Nokia's developer ' s suite, below is the Nokia developer ' s suite and some simulator registration codes:

nds_jme_v1.1 (Nokia Developer Suite)

User name: Allyfeng

Serial Number: pjzpqst0pjnmewatr2ga+wicesk=

Ns40

User name: Allyfeng

Serial Number: hgadbt1hpxfucqdp97thnjvn468=

7210

User name: Allyfeng

Serial Number: 89ypebkm6tzssxlli5oxuddhcyk=

Nokia 6650 Simulator

Registration information:

User name: Allyfeng

Serial Number: plkvtjrkbzplqixrqyb0czf969w=



Appendix 2:

Builder Mobileset 3.0.1. You need to install JBuilder7 or JBuilder8 first.

Registration method: Create a new text file, copy the following registration code to a file and save it. Select Active File when registering, and then

Loading the file will be available.

Registration code:

-----BEGIN Block-----

%c5%17%de%9b%00%00%02i%de%dal%

2c%b2%f7%9de%80c5%a6%e5%af%7c%

A7%06%05%d1%b1%b5%0a%955l%87%e

5%e6%5b%8c%0d%01%a9%ee%eb-%a9%

21%7c%e7%8a%e2%1d%b6lz%e2%f1%f

b0%e3%7b%1f%f6%e3%9a%3e%e4%1d%

2b%fd%fb%cd%5c%d6%2bo%fb%f6%89

%7f%d8j%3e%96%8c%98l%c0%03%15%

86%d3%fet%81%1bf%8f%dd%b6%02%d

76z%fe%e4%8b%5b%d8%02%1d%bd%f1

%b0p%a9%27%13%f6%8f%ae%0d%8a%7

Fr%99%ed%93%22%82v%2b%e7%9b%af

t%c3q%1f%8e%cc%bfp%a52%26%dc%9

f%8ec%d3%1cu%d1%aa%adb%da%1b%2

b%a0%8a%d2i%b3%0c%20%c2%dc%81r

%e3g%0a%90%e4%b2e%9d%11%3a%f1%

90%d2_%a0%7bo%c0%a4%a3%17%98%1

E%21%ee%9d%b3%24%9ak%1a%a5%be%

Be%3e%eag-%f1%b6%9bl%ba-%2f%f8

%d5%e2%23%c0j%27%e8%b2%ads%f6t

%03%c0%d6%e7%3e%e96%28%95%c3%e

7z%f4%3eh%b3%b3%d2y%a9f%16%92%

93%88%1a%a4mw%85%a1%92i%b0%5bq

%a7%ef%87i%d2%7f%3d%8a%a0%a3y%

Beqc%ea%8a%8e%08%95%02%7e%9a%f

f%dbe%80%40%04%8a%db%bbd%a7g%3

D%c7%a6%e0%7c%90%29*%ec%e0%abx

%d4%29n%d0%da%a6p%d6%11%1e%ed%

90%9d%1b%e7s%10%fd%b6%bf%14%a9

%07p%b9%b0%c1o%9ds%14%8c%87%99

E%f7%18%1e%9c%eb%fdc%b4%13a%d9

%9d%%2c%97%1a8%c1%af%d3x%87%

7fg%e6%94%98%26%90j%10%c8%ec%8

64%c2sn%e5%9e%d8t%efez%bb%8a%d

1%20%cd5%0b%fc%e3%cc%19%89jv%c

4%d9%e1r%a2z0%be%dd%a4j%91h%0d

%e3%f1%9c%2b%ed%06%60%e1%f2%fa

X%ca%18f%de%fb%abw%93q%29%d5%e

e%bff%a4%3e%02%b0%c6%adh%98p%0

D%ce%fe%fc%7f%ae%07%04%8e%c7%f

9d%ad%29%7c%df%af%b5v%98%20%1c

%a5%89%ed%7f%b5ru%ec%ab%fcq%af

z%5c%f4%9b%a7%5d%8c_%17%d8%cf%

b1%5b%d6g%28%b2%ee%f8%02%a0%0f

o%c3%b4%ecg%9e%3d%26%c2%cc%f4e

%ff_%3c%a5%91%bb%1c%d3%26v%da%

f7%95u%bd%3cf%d9%ee%e7%27%c8%1

5%3d%e7%a3%9e_%aar%7c%92%f8%cd

%13%9d%1e4%9f%84%eft%8f%5co%db

%b0%d4l%8chn%83%e4%ce%3f%f32v%

95%aa%a2f%97p%2f%e5%e5%d8d%91h

C

-----END Block-----

Appendix 3:toolkit Usage

Boot Kit: Locate the Ktoolbar program to start it. Pressing the Create Project button creates a new project. The system prompts you to enter the name of the project and the name of the main MIDlet class, whatever you write, and the class should run when the application is started. The toolkit will create the project directory for you using the project name you entered. Check that the displayed item properties are correct and we'll go back and check the settings later. Write Java program source code (or copy existing code) in Notepad and save the program code to the SRC subdirectory of the directory that you created in front of Ktoolbar to name your project name. Press the Build button to compile, and then press the Run button to test the program in the test simulator.



Appendix 4:

Download the following software first:

JDK 1.2 or later http://java.sun.com/j2se/

Limited connection device configuration (clcdhttp://www.sun.com/software/communitysource/j2me/download.html

midhttp://java.sun.com/products/midp/

Note: You need the Javac command in the JDK to compile the midlets.

Download, unzip the above software and put it in the following recommended directory:

C:\JDK1.2

C:\j2me



Midp



Clcd

This article assumes that the directory is C:\j2me



To test MIDP applications, you need to install MIDP and CLCD.

Configure the Run Environment: Set environment variables, modify path to add MIDP and JDK working paths.

Set environment variable: Set the variable in path, open Autoexec.bat with a text editor, or start typing the sysedit command in the beginning of the run, and insert the following two lines, we assume that your * system and JDK are all installed under C disk.

SET Path=%path%;%javahome%\bin;

Path=c:\windows; C:\WINDOWS\COMMAND; C:\JDK\BIN; c:\j2me\midp\bin;%path%

Check that your environment variable settings are successful

At the command line, type the following command: C:\MIDP carriage return.

A window should pop up at this point.

Set screen colors

C:\set Screen depth=8

C:\midp-des criptor Run.jad effect See figure 2

Well, you can now prepare to test the first MIDP.



Hellomidlet's description file

Code on the Hellomidlet example, http://wireless.java.sun.com/midp/articles/intro/;

Midlet-name:hellomidlet

midlet-version:1.0.0

Midlet-vendor:sun Microsystems, Inc.

Midlet-des cription:a Simple Example

midlet-info-urlhttp://java.sun.com/j2me/;

Midlet-jar-url:hello.jar

midlet-jar-size:1063

microedition-profile:midp-1.0

microedition-configuration:cldc-1.0

MIDlet-1: Hellomidlet, Hellomidlet



Compile, verify, package and run

Compile at the command line type the following command (should be implemented on one line):

C:\javac-d. \-bootclasspath c:\pathTo\MIDP\classes Hellomidlet.java

Verifying C:\preverify-classpath c:\j2me\MIDP\classes; C:\Examples\ Firstmidlet

A validated class file is written to the directory C:\Examples\output\.

Enter the C:\Examples\output\ directory and type the following command:

C:\EXAMPLE\OUTPUT>MIDP Firstmidlet

Package the Hellomidlet.class file into a jar file.

C:\jar CF Hello.jar Hellomidlet.class

Run C:\midp-des criptor Hello.jad



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.