开发者

Which edition of Java is being used in Android J2ME or Java SE?

Which editi开发者_开发问答on of Java is being used in Android J2ME or Java SE?


Everyone is right here, but let me a bit clarify the whole procedure - how it works:

  1. We use ordinary Java compiler from standard J2SE distribution and generate .class files - also known as byte code for Java VM
  2. Then using tool included in Android SDK (aapt) - we generate from .class files .dex files - in other words Dalvik VM bytecodes
  3. In the end we compress all those files (.dex + resources) into zip archive which we used to name as .APK file - kinda Android executable

So from this point of view - it's clear that Android neither J2ME (which run so called Kylobyte VM bytecodes) nor J2SE (which runs Java VM bytecodes)...

But from other point of view Android is definetely closer to J2SE - since it based on top of JVM bytecodes.


Android is not Java ME or Java SE. Android is a different platform and framework but Java is the programming language for the Android SDK. Android isn't using Java Virtual Machine but Dalvik. There is also a Android NDK for C/C++.


Android uses Dalvik

Dalvik is the virtual machine (VM) in Google's Android operating system. Dalvik is thus an integral part of Android, which is typically used on mobile devices such as mobile phones, tablet computers and netbooks. Before execution, Android applications are converted into the compact Dalvik Executable (.dex) format, which is designed to be suitable for systems that are constrained in terms of memory and processor speed.

http://en.wikipedia.org/wiki/Dalvik_virtual_machine


GNU project "J2SE for Android".

  1. it provides Swing and AWT classes, so you can run J2SE application on Android with this library.
  2. it implements most functions, NOT all.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜