[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
J2MEFAQ_WhatDoINead

J2MEFAQ What Do I Need

In this FAQ I will touch on the basic of tools that you might start your exploration into J2ME and then I will introduce you to some more advance tools that you might use later in your J2ME development.

Sun's WTK

Lets start with the most basic tool, Sun's WirelessToolKit(WTK). The latest WTK can be found at:

You will always want to use the latest release due to binary compatibility changes that usually occur between major versions of the JDK that this wtk uses. By doing this you can develop MIDP1.0 midlets using WTK2.1 and the JDK1.4 and thus avoid setting compile flags to account for differences in the bytecode generated by the JDKs.

Sun's WTK includes the obfuscation tool called RetroGuard. Retroguard is used to obfuscate the jar. We obfuscate CLDC midlets due to that the KVM does not have a full bytecode verifier and also to decrease the size of the jar to fit into the CLDC memory footprint.

While you can use the KToolbar component of Sun's WTK to enter J2ME code and compile, for more involved projects you are going to use some additional tools such as ANT, an IDE, and some additional ANT tasks specific to J2ME.

Apache's ANT

While most of us have a modern IDE that includes ANT, that is not always the case. In case you are using a non Modern IDE you will want to download ANT from Apache:

In the case of using a non modern IDE you will be using ANT from the command line to run your compilation and other build tasks.

Modern IDEs

While there are many free IDEs out within the java development community, Netbeans and Eclipse seem to have the most reasonable set of features that are used in J2ME development. You can find both these IDEs at:

Other ANT Tasks

As you get involved in developing more advance J2ME applications you will find the need to use ANT Task libraries specific to J2ME development. First lets give you the longest around Build task library for J2ME development, namely Antenna ANT tasks:

While it focuses on MIDP portion of J2ME development, enough features are present to be used in all J2ME development. Antenna allows you control preverification, jad, manifest and other task directly in ANT with new task definitions to use specifically for J2ME development.

J2ME Polish is a next generation toolkit for J2ME developers with Ant tasks, a device database and amazing preprocessing capabilities, a MIDP compatible GUI which can be designed using simple CSS textfiles, a logging framework and much more. With the device database and the powerful preprocessing capabilities, developers can easily optimize their MIDlets for specific devices or device-groups from a single source.

J2ME Polish is very simple to set up and includes all APIs needed for J2ME development. Also included is a sample application.

Image processing is still a much needed task with MIDP/1.0 in which each vendor does their own maligned support of PNG. You can drive this image processing to prepare the PNGs for proper vendor format by using Jakarta ANT Image Tasks:

Jakarta ANT Image tasks requires that you have JAI installed:



To increase your success with using these development tools in dealing with writing code that runs on all J2ME devices you will be using J2MEUNit to complete unit tests of your code. Part of the added beenfit of using unit tests in this case is that the author of J2MEUnit has a nice core set of ant scripts that are quite usefull as your first J2ME ant script build system:

Obfuscation Tools

Obfuscation tools reduce the size of the jar and are used in J2ME to reduce the size of a jar file to fit in a particular device. The obfuscation tools developers use in J2ME development are:

The version of RetroGuard in Sun's current WTK produces jars with too big of file sizes and othe errors. You can correct this by downloading the latest versionor by using one of the other obfuscators listed above.

Preprocessor Tools

In J2ME ther are two uses for Preprocessor tools. One of the uses is in changing core code to deal with vendor differences in sound and vibration apis in MIDP1.0 device development. The other major use is in code generation to change test code generated by using J2meunit and etc dynamically as to avoid doing it manually within the development environment.

Since its easier to use a tool that has both features, let us highlight VPP which has both features:

Its integrated with ANT as an ANT Task library and thus is installed in the same way all ant libraries are installed. The tempate engine VPP uses is called Velocity and the manual to velocity is at:

Other MIDP Emulators

While the SUN WTK is a basic emulator, its often required to use a vendor modified wtk to efectively test the application. Lists of J2ME MIDP Emulators/SDKs:

Conclusion

While most emulators listed here are for the MIDP portion of J2ME development, most other tools listed here are used in all facets of J2ME development and not just MIDP.



last edited (June 23, 2004) by enough, Number of views: 8438, Current Rev: 10 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.