Configure J2ME in Eclipse to simply run the J2ME program

Source: Internet
Author: User
Tags stub

1. Install the JDK
2. Go to the official website to download good eclipse, go to eclipseme.org download eclipseme,http://www.oracle.com/technetwork/java/download-135801.html downloading

(wiress Toolkit) WTK,WTK need to be installed.
3. Go to eclipse Select Help
4. Choose Install new software
5. Click Add
6. Click Archive in Add Repository ...
7. Choose to download a good eclipseme.feature package, zip format
8.ok
9. Select All
10.next
11.next
12. Select I accept the terms of the Licese agreement
13.finish to be networked during installation, something download from the Internet
14. Install complete, choose to restart Eclipse
15. Select the Preferences in window
16. Choose J2me->device Management->import
17. Select the WTK folder you have installed, such as: d:/wtk2.5.2_01
18.Refresh
19.Select All
20. Select a device, default on the line
21.Apply
22.ok
23. Select File->new->other->j2me->j2me MIDlet Suite
24.next Enter project name, Next,next
25.finish
26. Project creation complete, right key Src->new->j2me->j2me MIDlet
Input class name Hello,finish in 27.name
28. Enter in Hello

Import Javax.microedition.lcdui.Choice; Import Javax.microedition.lcdui.Display; Import javax.microedition.lcdui.List; Import Javax.microedition.midlet.MIDlet; Import javax.microedition.midlet.MIDletStateChangeException; public class Hello extends MIDlet {Display d = null; List List; public Hello () {//TODO auto-generated constructor stub} protected void Destroyapp (Boolean arg0) throws Midletstatechang eexception {//Todo auto-generated method stub} protected void Pauseapp () {//Todo auto-generated method stub} Protect Ed void startApp () throws Midletstatechangeexception {//TODO auto-generated method Stub String []s={"Hello", "Game"}; Lis T=new List ("My Game", choice.implicit, S, null); D=display.getdisplay (this); D.setcurrent (list); } }

29. Right key project name run As->run configurations-> right key wireless toolkit Emulator->new
30. You can change the name of the new_configuration to your own name
31. Select Midlet->search in Executable
32. Choose Hello, if there is a package name, with the name of the package
33.ok
34. Click Apply
35. Click Run

Related Article

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.