Current location - Music Encyclopedia - Dating - How to develop eclipse-based software
How to develop eclipse-based software

1. First, use Eclipse EclipseME WTK to build a J2ME development environment

Download, decompress and install Eclipse SDK Version: 3.3.2 (already installed), and install the Chinese language pack:

1) Eclipse:/products/sjwtoolkit/download.html

Installed to directory C:\\WTK2.5.2, in directory C:\\WTK2.5.2\\apps They are some Demo programs

3. Download and install EclipseME 1.7.9

pilation errors”

(“Suspend execution when an uncaught exception occurs” and "Suspend execution on compilation errors" is not selected, and set the "Debugger timeout" near the bottom of the window to 15000;

5 , Download and install the obfuscator Proguard 4.2 (this step is optional)

The obfuscator is very useful in reducing the size of the Jar package and preventing the program from being decompiled, so it is necessary to set up the obfuscator in the J2ME development environment.

/sourceforge/proguard/proguard4.2.tar.gz

Open Eclipse's preferences, expand J2ME, Packaging, Obfuscation, and fill in Proguard's name in "Progurd Root Directory" Installation directory;

6. All steps to build a J2ME development environment are now complete

7. Steps to develop J2me programs in Eclipse:

1) Click File- gt; New-gt; Other-gt; J2ME-gt; J2ME Midlet Suite to create a j2me Midlet project,

Enter the project name and the path of the project in the pop-up window, then Next, in Device Select the device you want to use,

Then Next, then Finish;

2) Then click File-gt; New-gt; Other-gt; J2ME again, this time choose to create J2ME Midlet, then enter the class name, and then Finish;

3) At this point, Eclipse has automatically created the project framework and a java file for us;

4) Then in the java file Just make modifications and add your own code

5) In Run-gt; Open Run Dialog, you can set the Midlet class name of the project to be executed

6) Then click the Run button You can run the program

7) After debugging and running the program, you can click the mouse on the current project name in the WorkSpace of the Eclipse interface, and then

click Project-gt; Close Project To close the current project, click Project-gt; Open Project to open the project again;

8) Close the project and then click delete to delete the project from the workspace. Be careful not to delete the project when deleting. Code content,

9) After deleting a project from the workspace, if you want to open the project again, you need to do the following:

Click File-gt; Import-gt; General-gt; Existing Projects into Workspace, then Next, then Browse,

Browse the directory where your project is located, such as D:\\Program Files\\eclipse\\myapps, the system will find all j2me project,

Then select the project name you want to open, and then Finish, the project will be opened in the Eclipse workspace