O'Reilly logo

Java™ ME Game Programming, Second Edition by Ph.D. Martin J. Wells, Ph.D. John P. Flynt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a MIDlet

In this section, you create a MIDlet, which is a micro device application (or applet). As mentioned in the previous section, before you begin work on this project, create a projects directory:

C:\j2me\projects

In the projects directory, create a subdirectory called hello:

C:\j2me\projects\hello

At this point, open Notepad or some other editing application. Save the file as hello.java. For Notepad and other generic editors, set the Encoding field to ANSI and the file type as *.java. The source code for hello.java is available on the CD in the Chapter 4 code folder. You can access it there and copy it into your projects directory, or type it as follows:

/** * Chapter 4 \ hello.java */ import javax.microedition.midlet.*; import ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required