Abiro  - The Lab
 
Web Abiro
Wireless Machine-to-Machine Communication

Java ME
   Terminology
      JSR 248 MSA
      JSR 271 MIDP 3.0
   Pros and Cons
   Get Started
   Resources
   Development Tools
   NetBeans
      Getting Started
   Applications
   Projects
      ColorSampler
      Converter Pro
      EasyCall
      Jiminy! SMS
      Jitter
      Mobile Blogger
      Unit Converter
      Watchdog
   Directory

Linux etc

PHP
   Pros and Cons
   Resources
   Applications
   Projects

Visual Basic
   Pros and Cons
   Resources
   Projects
   Snapper

Business Opportunities
 

Java ME - NetBeans

At the time being Eclipse is the most popular high-end tool for developing Java ME applications, but feature-wise NetBeans is well in line with Eclipse and in cases even better. NetBeans has numerous features to speed up and simplify MIDlet development. It can also be used for Java ME/CDC, Java SE and EE, PHP and C/C++ development, as well as XML and HTML editing.

The main unique feature for Java ME development is Mobility Pack, that offers CAD-like design of the user interface look-n-feel and flow, and code generation from that design, via the Visual Mobile Designer (VMD).

Note that for game development VMD is of less help. You can use it to create the flow for e.g. login and setup screens, and then also an empty canvas. After that it's up to you to create all the visuals and logic for the canvas. Most games use their own UI on top of canvas for e.g. setup etc as well, so in such cases you are not helped by VMD at all.

VMD generates standard MIDP lcdui calls, so the mobile phone won't notice a difference, and e.g. J2ME Polish can be used to customize the VMD-created UI via Cascading Style Sheets. We've verified that the method calls generated by VMD work well with J2ME Polish.

Be warned though: VMD is extremely slow in 6.5 if you have many lcdui screens. I hope they fix this in the next version.

Included in NetBeans Mobility Pack is also Mobile Game Builder that helps you create Canvas-based games.

NetBeans and Mobility Pack are free of charge, and work together with Java Wireless Toolkit (WTK; included with Mobility Pack) to provide a complete development and emulation environment for mobile applications. Most phone manufacturers also have their own  development tools and emulators, that typically are based on WTK with new skins and special configurations to match the feature sets of specific phones.

To get started you should download the NetBeans Java Bundle. That's all you need. You may read Getting Started with Mobile Development for the first steps needed to set up a Java ME / MIDP project in NetBeans. Then read Quick Start Guide that goes through a simple application example using VMD. Another great resource is Mobile Applications Learning Trail, that covers both CLDC and CDC development.

System Requirements

  • NetBeans is a Java SE application, and Java Se is in itself a memory hog, so we recommend 1 GB or more to avoid constant disk swapping, for Vista even more. Also close down applications you don't need before starting NetBeans.
  • Apart from that it runs well on a 2+ GHz PC.

IDE Configuration

  • Screen resolution: To get a better overview of a VMD flow, and also to see more of the source code, set the screen to the highest resolution possible. The scaled down screen shots shown below are from a laptop set to 1280 by 800, which is on the low end for practical use.
  • Editor font: Preferably use a proportional font (Verdana 10) and optionally also turn off all bold settings for all items. This makes reading the code much easier.
  • Indentation: 4 spaces per indentation and insertion of spaces instead of tabs are recommended.

Screen Shots

Examples of NetBeans in action. This is in fact screenshots from SercPos, a GPS/cell navigation application I'm working on.

 

Picture 1: each box represents a visible screen; lines indicate flows between screens; to the top right are elements that can be inserted

 

Picture 2: one of the screens being edited, in this case a form with different items like text fields and a choice group

 

Picture 3: the generated code; lines in blue are auto-generated and can't be modified directly; on white lines application logic has been added

 

See Resources for more information.

(c) 2004-2009 Abiro. All rights reserved. Terms of Service | Privacy Statement | Info Links
Site design, programming and information by Anders Borg.