1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines
EricGiguere.com > Eric's J2ME Pages > Fallacies of J2ME
Printer-friendly version Set your preferences
Read my blogs on AdSense and affiliate marketing
 Eric's J2ME Pages 
 
General
•  Overviews
•  FAQs
•  Fallacies
•  Acronyms
 
Special Topics
•  Security
•  Web Services
•  XML
 
Configurations
•  CLDC
•  CDC
 
Profiles
•  MIDP
•  IMP
•  FP
•  PBP
•  PP
 
Optional Packages
•  MMAPI
•  WMA
 
Resources
•  Tools
•  Mailing Lists
•  Forums
•  Other
 

 

Fallacies of J2ME

This list is meant to clear some misunderstandings you might have about Java 2 Micro Edition (J2ME). A fallacy, in case you're wondering, is a false notion. Fallacies abound in this world, this is my attempt to dispel a few of them.

The list of fallacies is:

  1. Java programs "will just work" on J2ME
  2. KVM == J2ME
  3. KVM == CLDC and CVM == CDC
  4. J2ME replaces WAP
  5. If you're learning Java, start with J2ME

If you think I need to add to the list, please contact me using the link at the bottom of this page.

Fallacy 1: Java programs "will just work" on J2ME

Realistically, don't expect to be able to run your existing Java applications unchanged on any J2ME platform. Apart from some technical issues (such as the CLDC 1.0 not supporting floating point), there will usually be two barriers: missing classes and resource problems. Not only do J2ME platforms subset the J2SE core classes, but they add some of their own unique classes as well. But even if you write code that only uses classes common to all the platforms you're interested in, chances are that you'll still have some work to do to optimize your application so that is uses less memory and has acceptable performance. Good design and modular programming will help a lot in this area.

This isn't to say that you can't reuse any code, just don't expect to reuse it all.

Return to the list of fallacies.

Fallacy 2: KVM == J2ME

Many people use KVM and J2ME synonomously. They're different things. The KVM is a Java virtual machine. J2ME is a set of specifications. Not every J2ME platform uses the KVM. The CDC, for example, uses the "classic" VM, not the KVM.

Return to the list of fallacies.

Fallacy 3: KVM == CLDC and CVM == CDC

In a similar vein, others use KVM and CLDC synonomously, or the CVM and CDC synonomously. Again, they're different. The KVM and CVM are Java virtual machines, the CLDC and CDC are J2ME configurations.

The CLDC has specific requirements for its underlying VM, and the KVM can be configured to be that VM. The KVM in fact forms part of the reference implementation of the CLDC. However, there's nothing preventing a specific CLDC implementation from substituting its own VM not based on the KVM source code. IBM's J9 VM, used in recent Palm devices, is one such example. So is Research In Motion's VM for the BlackBerry handhelds.

Similarly, the CDC has specific requirements for its underlying VM, and the CVM can be configured to be that VM. And yes, it too forms part of the reference implementation of the CDC. But CDC implementations can use their own VM, just like IBM uses its J9 VM in its CDC-based J2ME implementations.

Don't get all worked up about which VM is used. As long as it passes the compatibility tests and meets the appropriate specifications, it generally doesn't matter to you, the developer. The only time it matters is when performance is an issue and you'd like to switch to a faster VM. That said, remember that most handheld devices are closed platforms and only the platform vendor can actually install a different VM.

Return to the list of fallacies.

Fallacy 4: J2ME replaces WAP

WAP is a set of technologies for wireless communication. It includes a markup language called WML for writing browser-based applications. You can find out more about these technologies at WirelessDevNet.com.

WAP and J2ME are different things, and each has its place when it comes to application creation and deployment. WAP (or really, WML and WMLScript) lets you build browser-based, thin-client applications optimized for wireless delivery. J2ME lets you build "thicker" client applications with more sophisticated logic and the ability to run in an "offline" mode. It's really like trying to say: "which is better, a page of HTML or a Java applet?" Both are different, and both have their uses. Hopefully, though, J2ME won't suffer the same problems that caused applets to fall out of grace so quickly. This is why the standardization process, industry support, and compatible implementations are so important for the success of J2ME.

Return to the list of fallacies.

Fallacy 5: If you're learning Java, start with J2ME

If you're new to Java, skip over J2ME and go straight to J2SE (Java 2 Standard Edition). You'll find lots of material there about Java programming, you'll have lots of working examples to play with, and you won't have to worry about the sometimes arcane configuration issues and crippled tools you run into with the handheld devices that are J2ME's primary target. Don't start with J2ME until you're comfortable with J2SE on the desktop.

Return to the list of fallacies.

 
 
  
Learn about these ads
Google Web www.ericgiguere.com   
1-by-1 black pixel for creating lines
 
Copyright ©2003-2012 Eric Giguere | Send mail about this page | About this site | Privacy policy
Site design and programming by Eric Giguere | Hosting by KGB Internet Solutions
This site is Java-powered
Other sites: The Unofficial AdSense Blog | Google Suggest Explorer | Invisible Fence Guide | Synclastic
This page was last modified on December 17, 2003
1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines