Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

like image 291
Adil Anwer Avatar asked Feb 01 '11 19:02

Adil Anwer


People also ask

Which edition of Java is used for Android?

The mobile edition of Java is called Java ME. Java ME is based on Java SE and is supported by most smartphones and tablets. The Java Platform Micro Edition (Java ME) provides a flexible, secure environment for building and executing applications that are targeted at embedded and mobile devices.

Is Java and J2ME the same?

Java ME was formerly known as Java 2 Platform, Micro Edition or J2ME. As of December 22, 2006, the Java ME source code is licensed under the GNU General Public License, and is released under the project name phoneME.

What is J2ME used for?

Java 2, Micro Edition (J2ME) is designed for small devices with a limited processor power and small memory size. Mobile phones, personal digital assistants (PDAs), consumer electronics, and embedded devices are common examples of J2ME capable devices.

Does Android work with Java 11?

Android SDK tools are not yet compatible with Java 11 and need Java 8 (1.8) to run correctly. The Bitrise stacks provide both Java 8 and Java 11, with Java 8 being active by default. If you need a Java 11 runtime for your project to compile, you can switch to Java 11 only before it's needed by the next Step.


1 Answers

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.

like image 141
Barmaley Avatar answered Sep 27 '22 22:09

Barmaley