Given that both have Java as the core language & the purpose in both is Mobile Programming, I was wondering how different or same are they... And also how difficult would it be to transition between them.
"A problem well stated is a problem half solved.” - Charles F. Kettering
SCJP 6, OCPJWCD
J2ME is geared towards monolithic apps, where a single program does everything, much as is the case with desktop apps. Android is more of a component architecture. While an Android app stands by itself, often components within the app may be invoked by other apps. For example, a phone book app may publish an interface to its database services, allowing other apps to access phone book entries without having to explicitly code detailed support into the phonebook app.
Technically, Android is not "Java", since we usually consider Java to signify not only the language, but the VM and the core classes. No one really cared about the difference, however, until Oracle's lawyers got involved. The Dalvik environment is somewhat richer than J2ME, since its least-common-denominator is more powerful hardware, but for the most part, there's nothing missing in J2ME that will kill you.
The biggest difficulty in moving between the 2 platforms is their fundamental difference in application architecture. As I said, a J2ME app is a program (or set of programs), whereas an Android app is a set of interconnected modules where each module belongs to 1 of 4 basic component types. Both have lifecyle support for an environment where the app may be pushed into the background or put to sleep altogether, although Android makes those stages perhaps a bit more visible.
Customer surveys are for companies who didn't pay proper attention to begin with.
Thanks for your answer. I thought DVM was JVM optimized for mobile devices hence essentially the same. I've been doing some Android stuff, so familiar with the component based architecture, but wasn't sure how J2ME does things.
is there a way to run .jar file of J2ME on an Android mobile?
JME and Android are not compatible; specifically, the GUI portions are completely different. While some JSE libraries can be made to work on Android -as long as they don't use any AWT or Swing classes- getting a JME application to run on Android will require major effort.
and if I know Java good enough, how difficult will it be for me to Develop an App for Android.
It's not all that difficult, but be prepared that the GUI is entirely different from JSE and JME, and that the overall application structure is unlike what you may be used to from Java desktop apps.
Joined: Feb 14, 2011
Thanks Ulf Dittmer, I am all set to writing my own Android Apps after the completion of my SCJP.