Java backporting tools

Last updated

Java backporting tools are programs (usually written in Java) that convert Java classes bytecodes from one version of the Java Platform to an older one (for example Java 5.0 backported to 1.4).

Contents

Java backporting tools comparison

Main information

The JVM has evolved a lot for the past years. However, most language features that were added are simply a syntactic sugar. They do not require new byte-code, hence can be compiled to the Java 8. But, since the Java language was always bound to the JVM development, new language features require the same target as the JVM because they get released all together. [1]

Source VersionTarget VersionLast ReleaseLicenseWebsite
Retrolambda Java 8Java 7, 6, 52015-12-19, 2.1.0 Apache License 2.0 https://github.com/orfjackal/retrolambda
Retrotranslator Java 52009-08-09, 1.2.9 BSD-like http://retrotranslator.sourceforge.net/
Retroweaver Java 52008-10-14, 2.0.7 BSD-like http://retroweaver.sourceforge.net/
Declawer Java 5Java 1.42007-11-14 LGPL or MPL http://www.glazedlists.com/Home/declawer
JBossRetro Java 5Java 1.42008-03-10, 1.1.2 LGPL http://www.jboss.org/community/docs/DOC-10738
Jabel Java 9-14Java 1.82021-10-20, 0.4.2 Apache License 2.0 https://github.com/bsideup/jabel

Features

lambda expressions default methods generics enhanced for loops annotations autoboxing and unboxing static imports varargs Enumerations Reflection on generics and annotations Covariant return types
Retrolambda YesYes
Retrotranslator NoNoYesYesYesYesYesYesYesYesYes
Retroweaver NoNoYesYesYesYesYesYesYesNoNo
Declawer NoNoYes
JBossRetro NoNo
Formatted outputFormatted inputCollections framework enhancementsConcurrency utilitiesemulate the Java 5.0 memory model support for JDK1.6 File methods like canExecute()API support for JDK1.4API support for JDK1.3API support for older release
Retrolambda
Retrotranslator YesNoYesYes [2] NoNoextensivelimitednone
Retroweaver NoNoNoNoNo
Declawer
JBossRetro

See also

Related Research Articles

Java (programming language) Object-oriented programming language

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities that are typically not available in traditional compiled languages. As of 2019, Java was one of the most popular programming languages in use according to GitHub, particularly for client–server web applications, with a reported 9 million developers.

Java virtual machine Virtual machine

A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform.

Java and C++ are two prominent object-oriented programming languages. By many language popularity metrics, the two languages have dominated object-oriented and high-performance software development for much of the 21st century, and are often directly compared and contrasted. Java appeared about 10 years later and its syntax was based on C/C++.

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

In software design, the Java Native Interface (JNI) is a foreign function interface programming framework that enables Java code running in a Java virtual machine (JVM) to call and be called by native applications and libraries written in other languages such as C, C++ and assembly.

Write once, run anywhere (WORA), or sometimes Write once, run everywhere (WORE), was a 1995 slogan created by Sun Microsystems to illustrate the cross-platform benefits of the Java language. Ideally, this meant that a Java program could be developed on any device, compiled into standard bytecode, and be expected to run on any device equipped with a Java virtual machine (JVM). The installation of a JVM or Java interpreter on chips, devices, or software packages became an industry standard practice.

HotSpot, released as Java HotSpot Performance Engine, is a Java virtual machine for desktop and server computers, developed by Sun Microsystems and now maintained and distributed by Oracle Corporation. It features improved performance via methods such as just-in-time compilation and adaptive optimization.

JRuby is an implementation of the Ruby programming language atop the Java Virtual Machine, written largely in Java. It is free software released under a three-way EPL/GPL/LGPL license. JRuby is tightly integrated with Java to allow the embedding of the interpreter into any Java application with full two-way access between the Java and the Ruby code.

Jikes Research Virtual Machine is a mature virtual machine that runs programs written for the Java platform. Unlike most other Java virtual machines (JVMs), it is written in the programming language Java, in a style of implementation termed meta-circular. It is free and open source software released under an Eclipse Public License.

Jazelle DBX is an extension that allows some ARM processors to execute Java bytecode in hardware as a third execution state alongside the existing ARM and Thumb modes. Jazelle functionality was specified in the ARMv5TEJ architecture and the first processor with Jazelle technology was the ARM926EJ-S. Jazelle is denoted by a "J" appended to the CPU name, except for post-v5 cores where it is required for architecture conformance.

Java (software platform) Set of computer software and specifications

Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.

In software development, the programming language Java was historically considered slower than the fastest 3rd generation typed languages such as C and C++. The main reason being a different language design, where after compiling, Java programs run on a Java virtual machine (JVM) rather than directly on the computer's processor as native code, as do C and C++ programs. Performance was a matter of concern because much business software has been written in Java after the language quickly became popular in the late 1990s and early 2000s.

Eclipse OpenJ9 is a high performance, scalable, Java virtual machine (JVM) implementation that is fully compliant with the Java Virtual Machine Specification.

Retrotranslator is a program written in Java that converts Java classes (bytecode). The source classes may use Java 1.5 and Java 1.6 features, whereas the target will be compatible with Java 1.4 and older environments.

Java bytecode is the bytecode-structured instruction set of the Java virtual machine (JVM).

Android Studio Integrated development environment for the Android platform

Android Studio is the official integrated development environment (IDE) for Google's Android operating system, built on JetBrains' IntelliJ IDEA software and designed specifically for Android development. It is available for download on Windows, macOS and Linux based operating systems. It is a replacement for the Eclipse Android Development Tools (E-ADT) as the primary IDE for native Android application development.

GraalVM is a Java VM and JDK based on HotSpot/OpenJDK, implemented in Java. It supports additional programming languages and execution modes, like ahead-of-time compilation of Java applications for fast startup and low memory footprint. The first production-ready version, GraalVM 19.0, was released in May 2019. The most recent version is GraalVM 22.1.0, made available in April 2022.

Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin's standard library depends on the Java Class Library, but type inference allows its syntax to be more concise. Kotlin mainly targets the JVM, but also compiles to JavaScript or native code via LLVM. Language development costs are borne by JetBrains, while the Kotlin Foundation protects the Kotlin trademark.

References

  1. "Jabel - use modern Java 9-14 syntax when targeting Java 8". GitHub . 17 June 2022.
  2. It uses the backport of the Java 5.0 concurrency utilities.