Apache Harmony
| Company type | Open source project |
|---|---|
| Industry | Software development |
| Founded | May 2005 |
| Founder | Apache Software Foundation |
| Defunct | November 16, 2011 |
| Fate | Discontinued and retired |
| Headquarters | United States |
Area served | Worldwide |
| Products | Java SE implementation |
| Owner | Apache Software Foundation |
| Website | harmony |
Apache Harmony was an open source Java implementation offered at no cost, developed under the auspices of the Apache Software Foundation. Launched in May 2005 and promoted to a top-level project by October 2006, Harmony concentrated on Java SE 5 and subsequent editions, reaching approximately 99% completion for J2SE 5.0 and about 97% for Java SE 6 as of February 2011. This initiative notably provided foundational support for the Android platform until the release of Android Nougat, after which the platform transitioned to utilizing OpenJDK libraries.
On October 29, 2011, Tim Ellison, the project leader, called for a vote to discontinue Apache Harmony. The motion passed decisively with a tally of 20 in favor and 2 against. The project was formally retired on November 16, 2011.
Origins
The Harmony initiative was established with the goal of consolidating contributors from various free Java implementations, intending to exceed the progress of projects such as GNU and Apache. Early planning stages involved collaboration with GNU developers. Nevertheless, Apache opted not to incorporate code from GNU Classpath to preserve Harmony’s licensing under Apache License v2. As a result, Apache developers undertook a complete rewrite of classes, anticipating substantial code contributions from commercial software firms. Initial miscommunications and major corporate proposals—like IBM’s—led some observers to perceive Harmony more as a corporate alliance than a conventional Apache community-driven project.
A significant point of contention arose from incompatible licensing models: GNU Classpath was distributed under the GNU General Public License with a linking exception, whereas Harmony adopted the Apache License.
Challenges in obtaining a TCK license from Sun
On April 10, 2007, the Apache Software Foundation issued an open letter addressed to Jonathan Schwartz, then CEO of Sun Microsystems, expressing dissatisfaction over their unsuccessful attempts to secure an appropriate license for the Java SE 5 Technology Compatibility Kit (TCK). This kit was essential for validating compliance with the Java SE 5 specification. The license offered by Sun imposed restrictive "field of use" clauses that conflicted with the principles of the Java Community Process, which mandates royalty-free intellectual property licensing without usage constraints.
Sun replied through its corporate blog indicating plans to develop an open source Java platform under the GPL, including access to the TCK, with an emphasis on rapid availability for Linux users. This announcement generated criticism directed both at Sun’s transparency and Apache’s confrontational stance, with some commentators suggesting that Apache might have benefited from a more diplomatic negotiation approach.
In May 2007, Sun introduced OpenJDK featuring a specific license permitting TCK usage for GPL-licensed implementations derived from OpenJDK. However, this provision did not extend to Apache Harmony, which is not licensed under GPL. On December 9, 2010, Apache withdrew from the Java Community Process Executive Committee in protest over persistent difficulties in obtaining a suitable TCK license for Harmony.
Integration within Android SDK
The virtual machine powering Google’s Android platform—Dalvik up to version 4.4 and subsequently replaced by Android Runtime (ART)—utilizes a subset of Harmony’s core Class Library. Nevertheless, Dalvik does not conform to either Java SE or Java ME standards and omits components such as the AWT and Swing.
Starting with Android 7.0 "Nougat", Google transitioned away from Harmony in favor of adopting OpenJDK, thereby aligning more closely with standard Java implementations.
Conclusion of the project
On October 11, 2010, the primary contributor IBM redirected its efforts from Apache Harmony toward the OpenJDK initiative, partnering with Oracle to advance the official Java reference implementation. Bob Sutor, IBM’s head of Linux and open source, confirmed this strategic decision aimed at consolidating open source Java development.
After IBM's departure, the project's momentum significantly diminished. In October 2011, a survey conducted by project leader Tim Ellison on the harmony-dev mailing list resulted in a 20-to-2 majority favoring project retirement. Subsequently, on November 16, 2011, the Apache Software Foundation board officially discontinued the project, with only one vote opposing due to timing rather than questioning the project's value.
This event signified the conclusion of Apache Harmony’s role as an independent Java SE implementation.
Development team
At its inception, Apache Harmony benefited from substantial code contributions provided by multiple corporations. Development discussions were held openly on mailing lists. Over time, mentors from the Apache Software Foundation guided the team to adhere to "the Apache way," which contributed to effective project governance.
Final development status
Apache Harmony was formally recognized as an Apache project on October 29, 2006.
Architecture
The Dynamic Runtime Layer virtual machine architecture comprised:
- VM core: responsible for managing most of the JVM’s control operations.
- Porting layer: abstracts platform-dependent specifics through the Apache Portable Runtime.
- Garbage collector: oversees heap memory management and cleans up unreachable objects.
- Execution Manager: manages execution engine selection, profile handling, and dynamic recompilation processes.
- Class Library: delivers the standard Java class library.
- Thread manager: coordinates operating system thread management.
- Execution engine:
- Just-in-time compiler used for compiling and executing methods.
- Interpreter utilized primarily for debugging purposes.
Supported platforms and operating systems
Apache Harmony provided a portable Java implementation with an emphasis on Windows and Linux environments running on x86 and x86-64 processors.
| Windows 2000 | Windows XP, Windows Server 2003, Windows Vista | Linux (RHEL, SLES, Debian, Gentoo, Fedora) | FreeBSD | AIX | Mac OS X | |
|---|---|---|---|---|---|---|
| IA-32 (Pentium III or newer) | No | Yes | Yes | No | — | — |
| x86-64 (Intel 64, AMD64) | — | Yes | Yes | — | — | — |
| Itanium (IA64, IPF) | — | No | Yes | — | — | — |
| PowerPC 32-bit | — | — | No | — | — | — |
| PowerPC 64-bit | — | — | No | — | No | — |
| IBM System z 31-bit | — | — | No | — | — | — |
Class library coverage
The expected contributions from software companies materialized, with Apache Harmony integrating functional code such as Swing, AWT, and Java 2D, all generously provided by Intel.
By February 2011, Harmony had reached approximately 99% completion for JDK 5.0 and around 97% for Java SE 6. Development progress was monitored relative to J2SE 1.4 and Java SE 5.0 standards, while a Harmony v6.0 branch was under development targeting Java SE 6.0.
To expedite development rather than constructing every element anew, Harmony incorporated several established open-source projects. Notable components included:
| Component | Description |
|---|---|
| ICU | Libraries in C/C++ and Java providing Unicode support and internationalization features |
| Apache Xalan | An XSLT processor implementing XPath for both Java and C++ |
| Apache Xerces | XML parsing libraries available for Java, C++, and Perl |
| Apache Portable Runtime | A cross-platform abstraction library ensuring compatibility across different systems |
| Apache CXF | A high-performance web services framework supporting SOAP, RESTful HTTP, and CORBA protocols |
| BCEL | Tools designed to analyze and manipulate Java bytecode |
| MX4J | Java Management Extensions (JMX) utilities for monitoring applications and networks |
| VM Magic | Java extensions facilitating system programming through direct memory access operations |
| Bouncy Castle | Lightweight cryptographic libraries implemented in Java and C# |
| ANTLR | A framework for constructing language recognizers, interpreters, and compilers based on grammar definitions |
Documentation
Compared to alternatives such as GNU Classpath, Harmony's documentation is relatively sparse. For instance, GNU Classpath offers extensive commentary on fundamental CORBA classes within both its API and implementation code. In contrast, the Yoko project integrated into Harmony contained numerous methods lacking documentation as of late 2006. Furthermore, while GNU Classpath supported a broad range of CORBA features including both legacy and modern capabilities similar to Sun's implementation, Harmony did not implement important older methods like ORB.connect(Object).
Tools
A complete Java platform necessitates a compiler to convert source code into bytecode, alongside utilities for handling JAR files, a debugger, and an applet viewer plus a web browser plugin. Harmony provides a suite of tools including a compiler, appletviewer, jarsigner, javah, javap, keytool, policytool, and unpack200.
Virtual machine support
Harmony's Class Library operates on seven external virtual machine implementations:
- JC Harmony Edition VM ("JCHEVM"), derived from the JCVM interpreter and contributed by Archie Cobbs.
- BootJVM, a straightforward bootstrapping virtual machine created by Daniel Lydick.
- SableVM, a sophisticated portable interpreter developed by the Sable Research Group.
- DRLVM, a just-in-time compilation VM contributed by Intel.
- BEA’s evaluation release of JRockit VM running the Harmony Class Library.
- JikesRVM, an open-source meta-circular JVM utilizing Harmony’s Class Library.
- Ja.NET SE, an open-source Java 5 JDK built on Harmony libraries that runs on the .NET Framework CLR.
By the end of 2006, language support across these virtual machines remained incomplete; IBM's proprietary J9 was advised for testing purposes but became unnecessary by mid-2007. Development on DRLVM had ceased as of May 2011.
Application status
By 2007, Harmony had reached a level of maturity capable of executing complex Java applications with substantial compatibility:
- Eclipse achieved a 99.3% pass rate on 36,000 reference implementation (RI) tests using DRLVM combined with the class library.
- Apache Tomcat passed 100% of RI tests.
- JUnit also attained a perfect 100% pass rate.
- Apache Ant demonstrated a 97% success rate on RI tests.
- Additional applications such as Apache Derby, Apache Axis, Log4j, Apache Velocity, Apache Cocoon, jEdit, and Apache Commons showed strong compatibility as well.
However, certain applications faced limitations due to incomplete library support:
- ArgoUML depends on a Java applet environment that Harmony had yet to implement.
- Apache Geronimo operated with some difficulties requiring workarounds.
- Vuze (formerly Azureus) was unsupported because essential security classes were missing.
See also
- GNU Classpath
- List of Java virtual machines
- Free Java implementations
- Java Class Library
- OpenJDK
- IcedTea