J2ME and Forte For Java

Sun’s Forte for Java IDE can be used to develop and debug MIDlets through its tight integration with the J2ME Wireless Toolkit. The Community Edition of Forte for Java is free and can be downloaded from http://www.sun.com/forte/ffj/. Once you have installed it, you need to install (or reinstall) the Wireless Toolkit in order to integrate its features into the IDE. During the Wireless Toolkit installation, a dialog appears, offering two different types of setup: standalone or integrated. To use the features of the Wireless Toolkit from within Forte for Java, you must select integrated setup.

Once you have completed the setup, the extra features that let you create MIDlet suites and MIDlets and run and debug them in the emulators supported by the Wireless Toolkit appear in the IDE’s menu system. The rest of this section assumes that you are reasonably familiar with Forte for Java and concentrate on demonstrating some of the J2ME-related functionality without going into much detail on the IDE itself.

Creating a Project and Importing Source Code

Like most IDEs, Forte for Java is based around projects. In order to create and compile source code, you first need to create a project, which you can do by selecting Project Project Manager New . . . and supplying a name for your project. A project has an associated set of filesystems that represent the directories and JAR or ZIP files that the IDE tools work with. All the class libraries and source code that you ...

Get J2ME in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.