MOBILE

Java Me Programming Steps

9/3/2010 8:13:08 PM

Figure 11.1 shows the Sun Java Wireless Toolkit©used to develop wireless applications that are based on Java ME's CLDC and MIDP. The toolkit includes the emulation environments, performance optimization and tuning features, documentation, and examples that developers need to bring efficient and successful wireless applications to market quickly. The following steps show how to develop an MIDP application, in this case a simple "Hello, World!" program, under Microsoft Windows XP:

Figure 11.1. A screenshot of KToolbar after launching © 2008 Sun Microsystems, Inc.

  1. Download and install Sun Java Wireless Toolkit 2.3 Beta, which includes a set of tools and utilities and an emulator for creating Java applications that run on handheld devices, at the URL (http://java.sun.com/products/sjwtoolkit/download-2_3.html).

  2. Run the development environment KToolbar of an MIDlet, an MIDP application, as shown in Figure 11.1 by selecting the following Windows options:

    Start ⇒ All Programs ⇒ Sun Java Wireless Toolkit 2.3 Beta
    ⇒ KToolbar

  3. Create a new project by giving a project name such as HelloSuite and a class name such as HelloMIDlet as shown in Figure 11.2. After the project HelloSuite is created, the KToolbar will display the message shown in Figure 11.3, which specifies where the Java source files, application resource files, and application library files are to be put.

  4. Create a J2ME source program and place it in the directory of the local disk (C:\WTK23\apps\HelloSuite\src\). Figure 11.4 gives a J2ME example, which displays the text "Hello, World!" and a ticker with the message "Greeting, world."

    Figure 11.2. A screenshot of the pop-up window obtained after clicking on the button "New Project" of KToolbar © 2008 Sun Microsystems, Inc.
    Figure 11.3. A screenshot of KToolbar after the project HelloSuite is created © 2008 Sun Microsystems, Inc.
    Figure 11.4. An example of a MIDlet program HelloMIDlet.java
    Figure 11.5. The screenshot of an emulator displaying the execution results of HelloSuite © 2008 Sun Microsystems, Inc.
  5. Build the project by clicking on the "Build" button. The "Build" includes compilation and pre-verifying.

  6. Run the project by clicking on the "Run" button. An emulator will be popped up that displays the execution results of the built project. For example, Figure 11.5 shows an emulator displays the execution results of HelloSuite.

  7. Upload the application to the handheld device using USB cables, infrared ports, or Bluetooth wireless technology.

Other  
 
Top 10
Windows Server 2003 : Maintaining, Monitoring, and Troubleshooting Printers
Windows Server 2003 : Advanced Printer Configuration and Management
Windows Server 2003 : Installing and Configuring Printers
Windows 7 : Sharing Resources on a Network - Turn on Sharing and Discovery
Windows 7 : Sharing Resources on a Network - Methods for Sharing in Windows 7
HP Network Node Manager 9 : Before we Manage with NNMi (part 5) - Installing software
HP Network Node Manager 9 : Before we Manage with NNMi (part 4) - Server sizing considerations, Licensing policy
HP Network Node Manager 9 : Before we Manage with NNMi (part 3) - Understanding Smart Plug-ins - iSPI Network Engineering toolset, iSPI IP Telephony, iSPI for MPLS, iSPI multicast
HP Network Node Manager 9 : Before we Manage with NNMi (part 2) - Understanding Smart Plug-ins - iSPI Performance for Metrics
HP Network Node Manager 9 : Before we Manage with NNMi (part 1) - What can HP SW NNMi do for us?
Most View
WD's My Passport (2TB) - Never leave home without it
The best of the web (Part 2) - Evernote & ChallengePost
The Effect Of IOS And Facebook On Shutterbugs (Part 1)
Sharepoint 2007: Upload a File Using the Explorer View
Windows Vista : Performing Local PC Administration (part 1) - Working with workstation administration tools
Windows XP : Verifying Digitally Signed Files, Reviewing Event Viewer Logs, Setting Up a 10-Step Maintenance Schedule
Personalizing Windows 7 (part 2) - Choosing Your Desktop Background
.NET Enterprise Services Technologies : Application Blocks and Software Factories
Fujifilm FinePix F800EXR Super-Zoom Compact With WiFi Connection
Windows Azure : Storing static reference data with dynamic data
Lenovo ThinkPad X220
Windows 7 : Recovering After a Crash or Other Problem (part 3)
Microsoft Wedge And Sculpt Kits For Windows 8
Windows 7 : Using Windows Defender (part 1) - Configuring Windows Defender
Microsoft XNA Game Studio 3.0 : Getting the Date and Time
Windows Azure : Messaging with the queue - Working with basic queue operations
Audioengine A5+ Powered Speakers
Registering CLR Assemblies for Use with SQL Server
iPhone Application Developmen : Using the View-Based Application Template (part 3)
Use the new BBC website (Part 1)