- Apache Harmony
Infobox Software
name = Apache Harmony
caption = Demonstration of the Apache Harmony runningJava 2D Demo
collapsible = yes
developer =Apache Software Foundation
latest release version = 5.0 M7
latest release date = release date|2008|07|31
latest preview version =
latest preview date =
operating system = Windows andLinux
programming language =C++ and Java
genre =Java Virtual Machine and Java Library
license =Apache License 2.0
website = http://harmony.apache.orgApache Harmony is an
open source /free Java implementation , starting withJava SE 5.0. It will be licensed under theApache License , Version 2. It was announced in early May 2005 and on October 25th 2006, the Board of Directors voted to make Apache Harmony a top-level project.History
Initiation
The Harmony project was initially conceived as an effort to unite all developers of the
Free Java implementations . Many developers expected that it would be the project above theGNU , Apache and other communities. GNU developers were invited into and participated during the initial, preparatory planning. Later it was decided not to use the code fromGNU Classpath , and that Harmony would use an incompatible license; therefore blocking the sharing of code between Harmony and existing free Java projects. Apache developers would then write the needed classes from scratch and expect necessary large code donations from software companies.Reasons for rewriting from scratch
The main reason for disagreements between the GNU Classpath and Apache projects is due to differences between the
GNU General Public License (GNU Classpath's license also contains the linking exception) andApache License . These disagreements are inspired by various organizations and individuals [cite web| url=http://lwn.net/Articles/184967/| title=Toward a free Java| author=Mark Wielaard| date=2006-05-24 | publisher=LWN.net ] that prefer the Apache License, which allows for closed source derived works. GNU Classpath can also be linked [cite web| url=http://www.gnu.org/software/classpath/license.html| title=GNU Classpath License| ] with proprietary code, but it is legally difficult to make a closed source derivative of GNU Classpath itself. However, many free software developers think that the licenses and philosophy of these communities are not different enough to split the efforts, and the inability to find compromises is frequently estimated negatively. The occasionally appearing suggestion to view these projects as opposing forces does not find wide support. Enthusiasts of the free software tend to break the discussion with the simple words that "more free software is not a problem". [cite web| url=http://developer.classpath.org/pipermail/classpath/2006-June/000965.html| title=Harmony, JavaONE 2007 and other thoughts| author=Dalibor Topic| date=2006-06-01 ]Difficulties to obtain a TCK license from Sun
The
Apache Software Foundation sent the following letter toSun Microsystems CEO, Jonathan Schwartz, on April 10, 2007, regarding their inability to acquire an acceptable license for the Java SE 5Technology Compatibility Kit (TCK), a test kit needed by the project to demonstrate compatibility with the Java SE 5 specification, as required by the Sun specification license for Java SE 5. [ [http://www.apache.org/jcp/sunopenletter.html Open Letter to Sun Microsystems] ] What makes the license unacceptable for ASF is the fact that it imposes rights restrictions through limits on the "field of use" available to users of Harmony, not compliant with theJava Community Process rules. [According to ASF, 1) a specification lead cannot "impose any contractual condition or covenant that would limit or restrict the right of any licensee to create or distribute such Independent Implementations" (section 5.C.III), and 2) "a specification lead must license all necessary IP royalty-free to any compatible implementation of a specification" (section 5.B).]Sun answered on a company blog [http://blogs.sun.com/ontherecord/] [http://java.sys-con.com/read/360602.htm] that it intended to create an open source implementation of the Java platform under
GPL , including the TCK, but that their current priority was to make theJava Platform accessible to the GNU/Linux community underGPL as quickly as possible.This answer triggered some reactions, either criticizing Sun for not responding "in a sufficiently open manner" to an open letter [http://ianskerrett.wordpress.com/2007/04/16/the-silence-from-an-open-sun/] , or rather
Apache Software Foundation ; some think that ASF acted unwisely to aggressively demand something they could have obtained with more diplomacy from Sun, especially considering the timescale of the opening class library [http://gnu.wildebeest.org/diary/2007/04/21/openjck/] [cite web
url=http://jroller.com/page/dgilbert?entry=five_reasons_why_apache_will
title=Five Reasons Why Apache Will Regret That Open Letter
last=Gilbert|first=Dave
date=2007-04-16
accessdate=2008-03-08] .Since Sun's release of
OpenJDK , Sun has released a specific license to allow to run the TCK in the OpenJDK context for any GPL implementation deriving substantially from OpenJDK [cite web
url=http://openjdk.java.net/legal/openjdk-tck-license.pdf
title=OPENJDK COMMUNITY TCK LICENSE AGREEMENT V 1.1
publisher=Sun Microsystems
quote="Subject to and conditioned upon its Licensee Implementation being substantially derived from OpenJDK Code and, if such Implementation has or is to be distributed to a third party, its being distributed under the GPL License, Sun hereby grants to Licensee, to the extent of Sun's Intellectual Property Rights in the TCK, a worldwide, personal, non-exclusive, non-transferable, limited license to use the TCK internally and solely for the purpose of developing and testing Licensee Implementation."
accessdate=2008-03-08|format=PDF] .Development team
Apache Harmony started from being mostly developed by several companies, receiving large code contributions at once. However, the general discussions on the mailing lists were always opened for everyone, and later the Apache Software foundation mentors put a lot of effort [cite web| url=http://article.gmane.org/gmane.comp.java.harmony.devel/10742| title="We would like all the development to happen right here"|author=Leo Simons| date=
2006-07-24 ] to bring the development process more in line with the Apache way, [cite web| url=http://incubator.apache.org/learn/theapacheway.html| title=The Apache Way] and it seems that their efforts were highly successful. In November 1, 2006, the current team of committers consisted of 16 developers, 12 of them from IBM and Intel. [cite web| url=http://incubator.apache.org/harmony/contributors.html| title=List of Apache Harmony Committers]Recent development status
Apache Harmony has been accepted among the official Apache projects on 29th October 2006.
Architecture
The Dynamic Runtime Layer virtual machine consists of the following components:
#The VM core: with its subcomponents concentrates most of the JVM control functions.
#The porting layer: hides platform-specific details from other VM components behind a single interface and is based on theApache Portable Runtime layer.
#The Garbage Collector: allocates Java objects in the heap memory and reclaims unreachable objects using various algorithms
#Execution Manager: selects the execution engine for compiling a method, handles profiles and the dynamic recompilation logic.
#Class Library: is a Java standard library.
#The thread manager that handle Operating system threading
#The execution engine: contains of the following:
##Thejust-in-time compiler for compilation and execution of method code.
##The interpreter for easier debugging.upport Platform and Operating System
The project provide a portable implementation that ease development on many platforms and operating systems. The main focus on
Windows andLinux operating systems on x86 and x86_64 architectures. [ [http://harmony.apache.org/supported_platforms.html Apache Harmony supported platforms and operating systems] ]Class Library Coverage
The expected donations from software companies were actually received. The Apache Harmony now contains the working code, including the Swing, AWT and
Java 2D code which were contributed byIntel .The part of the implemented classes is still smaller than in
GNU Classpath (97.7% in the trunk versus almost 100% as of July 2007 [that a class is implemented does not imply that this class behaves as requested in the RI specification. For example, some implemented methods can still do nothing at all (this is also true forGNU Classpath )] ), despite some non-trivial applications were shown being running in 2006JavaOne international conference.Also Harmony's test suite is less extensive than
GNU Classpath 's for now (20000 tests [http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM] versus 50000 [http://www.object-refinery.com/classpath/mauve/report/] as of October 2006).The progress of the Apache Harmony project can be tracked against J2SE 1.4 and Java SE 5.0. [ [http://people.apache.org/~chunrong/latest-harmony-japi.html Apache Harmony Library Coverage against Java SE 5.0] ] Also, there is a branch for Harmony v6.0 in development for Java SE 6.0.
Apache Harmony developers integrate several existing, field-tested open-source projects to meet their goal (not
reinventing the wheel ). Many of these projects are mature and well known and other part of the library need be writing from scratch.Here a list of the existing open source components that are used in the Apache Harmony and maybe before the project is started.
Documentation
Harmony is currently less documented than the alternative free Java implementations. For instance, in GNU Classpath every method of the central
CORBA class (ORB) has the explaining comment both in the standard abstract API class [http://cvs.savannah.gnu.org/viewcvs/*checkout*/classpath/org/omg/CORBA/ORB.java?rev=1.2.2.12&root=classpath] and implementation [http://cvs.savannah.gnu.org/viewcvs/*checkout*/classpath/gnu/CORBA/OrbFunctional.java?rev=1.6&root=classpath] . In the [http://incubator.apache.org/yoko/ Yoko] project, used by Harmony [http://www.mail-archive.com/yoko-dev@incubator.apache.org/msg01428.html] , the majority of methods both in the standard declaration [http://svn.apache.org/repos/asf/incubator/yoko/trunk/yoko-spec-corba/src/main/java/org/omg/CORBA/ORB.java] and implementing class [http://svn.apache.org/repos/asf/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBCORBA/ORB_impl.java] were not documented (at the end of October, 2006). Also, GNU Classpath supported both older and current CORBA features (same as Sun's implementation). Harmony, differently, left the central method of the older standard (ORB.connect(Object)) fully unimplemented.Tools
A complete implementation of the Java platform also requires a
compiler that translates Java source code intobytecode s, a program that manages JAR files, adebugger , and anapplet viewer andweb browser plugin , to name a few. Harmony currently only has the compiler [http://incubator.apache.org/harmony/roadmap.html#General] .Virtual machine support
Harmony currently has six
virtual machine implementations that run Harmony Class Library, all of which were donations by external groups:
* JC Harmony Edition VM, "JCHEVM," based on the JCVM's interpreter, contributed by the author,Archie Cobbs .
* BootJVM, a simple bootstrapping virtual machine, contributed byDaniel Lydick .
*SableVM , an advanced, portable interpreter, contributed by authors from theSable Research Group ; and the Dynamic Runtime Layer Virtual Machine.
*DRLVM , ajust-in-time compiler contributed byIntel .
* BEA announced the availability of an evaluation version of JRockit VM running Apache Harmony Class Library [BEA JRockit VM under a binary, evaluation-only license [http://mail-archives.apache.org/mod_mbox/harmony-dev/200701.mbox/%3C1D7F0297-B0C5-4B05-AD27-B457B309C425@pobox.com%3E] ] .
*JikesRVM , an open-source meta-circular JVM that use the Apache Harmony Class Library [ [http://mail-archives.apache.org/mod_mbox/harmony-dev/200808.mbox/%3cb1e4cffb0808070820u2554f4faw4d98aa5059b5b425@mail.gmail.com%3e Announcing Jikes RVM 3.0 + Apache Harmony] ] .In the end of November, 2006, the language support provided by these virtual machine was still incomplete, and the build instructions recommended to useIBM 's proprietary J9 instead to run the class library test suite. However, this is not necessary anymore (as of July 2007).The DRLVM
virtual machine is currently (as of July, 2006) under heavy development, so a fast improvement of its features can be expected.Applications status
Since its conception, Harmony has steadily grown in its ability to execute non-trivial Java applications (see [http://wiki.apache.org/harmony/Application_Status here] ). As of July 2007, supported applications include:
* Eclipse : 99.3% of the 36000 RI test pass on Harmony's DRLVM + class library. [http://wiki.apache.org/harmony/Eclipse_Unit_Tests_Pass_on_DRLVM#PassRate_2007] .
*Apache Tomcat : 100% of the RI tests pass [http://wiki.apache.org/harmony/Apache_Tomcat] .
*JUnit : 100% of the RI tests pass [http://wiki.apache.org/harmony/JUnit] .
*Apache Ant : 97% of the RI tests pass. [http://wiki.apache.org/harmony/Apache_Ant] .
* other applications pass with a high success rate, such asApache Derby ,Apache Axis ,Log4j , Apache Velocity,Apache Cocoon ,jEdit , and Apache Commons.However, Harmony's incomplete library prevents it from launching some other applications:
*ArgoUML : because it requires aJava applet implementation, which is still not available in Harmony.
*Apache Geronimo runs on Apache Harmony with some issues and some workarounded [ [http://cwiki.apache.org/confluence/display/GMOxDOC20/Apache+Harmony Running Geronimo on Harmony] ] .
*Vuze , formerly Azureus, because of unimplemented security classes.ee also
*
GNU Classpath
*List of Java virtual machines
*Free Java implementations
*Java Class Library References
External links
* [http://harmony.apache.org/ Apache Harmony Web Page]
* [http://mail-archives.apache.org/mod_mbox/incubator-general/200505.mbox/%3CE3603144-2C26-4C31-896D-6CC7445A63EB@apache.org%3E Apache Harmony FAQ]
* [http://svn.apache.org/viewcvs.cgi/incubator/harmony/enhanced/classlib/trunk/modules/ Apache Harmony source code repository]
* [http://developers.sun.com/learning/javaoneonline/2006/coreplatform/TS-3752.html JavaOne 2006 Online Harmony Session]
* [http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-7820&yr=2007&track=6 JavaOne 2007 Online Harmony Session]
* [http://parleys.com/display/PARLEYS/Apache+Harmony?showComments=true Apache Harmony] by Geir Magnusson Jr at JavaPolis 2006
* [http://www.osnews.com/story.php?news_id=10806 The Java open source debate] - a good summary of the debate
Wikimedia Foundation. 2010.