OpenJDK for Android in Delphi Development
You may not know this, but Java comes in many flavors and parts. After Oracle acquired Sun Microsystems, they became the official owner of the Java trademark and the main “official” Java distributions. First off a disclaimer: I’m not a lawyer, nor am I a Java developer. This is a high-level overview of a number of complex issues related to Java, Java development, and licensing. My goal is to give you enough information to move forward and be successful, but I encourage you to do some additional research and consult a lawyer if you need additional information. I know that I will miss details and gloss over important points. Java is made up of the following parts JVM: The Java Virtual Machine is the virtual machine that runs all Java applets. Java applets are usually distributed as Java bytecode in a JAR file. Java bytecode doesn’t run natively on the physical computer. Instead, it runs on the JVM. The JVM is a Just-in-Time compiler (JIT) that converts the Java bytecode into native machine code. The two popular flavors of the JVM are Hotspot (the official JVM used by the Oracle JDK) and OpenJ9. Technically Android doesn’t have a JVM. Instead, the Java bytecode is converted into Dalvik bytecode and run on the DVM (Dalvik Virtual Machine) or compiled by ART (Android Runtime). Both use .dex files, but ART translates the bytecode into .elf (Executable and Linkable Format) files. This article is mostly focused on the Java desktop side for building Android apps with Delphi, but I wanted to add this aside for clarity. JRE: The Java Runtime Environment contains the main libraries a Java applet needs to run, along with the JVM. It includes Java.exe and Javaw.exe that run the applets and other utilities. JDK: The Java Development Kit, or the SDK for Java development. The JDK is a superset of the JRE. This is what you use for building Java (and Android) applications, while it also provides everything you need to run Java applets. It includes a number of utilities like KeyTool.exe and JarSigner.exe used to make There are 3 variants of the Java platform released by Oracle: Standard Edition (Java SE), Enterprise Edition (Java EE), and Micro Edition (Java ME). This blog post, and most use cases you will encounter, involve the Standard Edition. Where it gets interesting is with the OpenJDK, a free and open-source implementation of the Java Standard Edition (SE) Platform. It is the official reference implementation of Java SE since version 7. The source implementation is licensed under the GNU General Public License version 2 with a linking exception. [wikipedia] Similar to how Chrome is based on the open-source Chromium project, Java SE is based on OpenJDK. Anyone, yourself included, could download the OpenJDK source files and create a binary build. There are a number of organizations that do that, and each one has its own spin on licensing, support, and included components. Here are a few (these are binary distributions of the OpenJDK source). Build Long TermSupport PermissiveLicense Pure Commercial Support AdoptOpenJDK / JClarity / IBM Java SDK Yes Yes Optional Yes Alibaba Dragonwell Yes Yes No Yes Amazon Corretto Yes Yes No No Azul Zulu Yes Yes No Yes BellSoft Liberica JDK Yes Yes No Yes ojdkbuild Yes Yes Yes No Oracle Java SE Yes No No Yes Oracle OpenJDK No Yes […]
