GNU Classpath

Last updated
GNU Classpath
Developer(s) GNU Project
(formally held by FSF)
Final release
0.99 [1] / March 16, 2012;11 years ago (2012-03-16)
Repository
Written in C and Java
Operating system Cross-platform
Type Library
License GPL linking exception
Website www.gnu.org/software/classpath/

GNU Classpath is a free software implementation of the standard class library for the Java programming language. Most classes from J2SE 1.4 and 5.0 are implemented. Classpath can thus be used to run Java-based applications. GNU Classpath is a part of the GNU Project. It was originally developed in parallel with libgcj due to license incompatibilities, but later the two projects merged.

Contents

GNU Classpath was deemed a high priority project by the Free Software Foundation. When the Classpath project began, the license for the official Java implementation from Sun Microsystems did not allow distribution of any alterations. Since the inception of the Classpath project, the OpenJDK was released under the GPL and now serves as the official reference implementation for the Java platform.

License

GNU Classpath is licensed under the GNU General Public License with a linking exception. This is a free software license. All code is formally owned by the Free Software Foundation,[ citation needed ] and this owner is bound by its own contractual obligations to the developers.[ clarification needed ]

Uses

GNU Classpath is used by many free Java runtimes (like Kaffe, SableVM, JamVM, Jikes RVM, and VMKit) because every full-featured Java virtual machine must provide an implementation of the standard class libraries.

Some other uses include:

History

GNU Classpath development started in 1998 with five developers.[ citation needed ] During the history, it merged several times with other projects having similar goals (Kaffe, libgcj). In the past, GNU Classpath supplied its own virtual machine (Japhar). As Classpath was becoming a base library, shared with a lot of different projects, this virtual machine received less and less attention and is now no longer supported.[ citation needed ]

After implementing the majority of the official Java 1.4 API, the work in the project became more bug oriented rather than API coverage oriented. On October 24, 2006, the implementation of the last missing 1.4 class, HTMLWriter, was committed. The development speed (computed mathematically as the average number of the new lines of code per day) reached its highest ever in 2006.[ citation needed ]

The name GNU Classpath was originally suggested by Bradley M. Kuhn to one of the first developers, Paul Fisher. At the time, there was great concern in the Free Java implementations community about enforcement of Sun's trademark on Java against free implementations. Kuhn suggested the name $CLASSPATH, which is the environment variable used by most Java systems to indicate where the Java libraries reside on the computer. Since $CLASSPATH often expanded to a path name that included the word java (such as /usr/lib/java), it was a way to evoke the name Java without actually saying it. Fisher and other developers didn't like the unsightly use of the $ and all capital letters and settled on Classpath.

Development team

The maintainer takes care of the legal side of the project, prepares the regular project releases and does some quality management. The maintainer also grants the CVS access permissions.[ citation needed ]

GNU Classpath has no formal hierarchy. The work is done by the most technically capable, and there is no strict work division either. All code changes are first posted to the discussion list as patches where they can be opposed if needed. The project typically receives between five and eight patches per day.

The GNU Classpath library code coverage progress can be tracked against OpenJDK6 [4] and OpenJDK7. [5]

Virtual machine integration

GNU Classpath contains classes from the official Java API namespace. Where calls to native code are necessary or highly desired, this is done from a small number of "VM" classes. The name of such a VM class matches the name of the class requiring native methods, plus the additional VM prefix: VMObject, VMString and so on. VM classes, stored separately from the rest of code, are package private and final. The methods of these classes contain the keyword native, indicating the necessity of the supporting native library. Such libraries are provided by the authors of a Java virtual machine, hence GNU Classpath can be connected to nearly any Java virtual machine if the sources of such virtual machine are available and can be modified.

Support for the new language features in Java 1.5

Before version 0.95, each GNU Classpath release consisted of two separate release tarballs; one that represented the state of the main development branch and another that contained the contents of a more experimental branch, supporting the additions, such as generics, enumerations and annotations, present in Java 1.5. [6]

Since version 0.95, [7] Java 1.5 additions like generics have been fully integrated into the main branch. The branch can be built by using the Eclipse compiler, ecj, to compile Java 1.5 source code to bytecode. In the case of GCJ, it uses ecj to perform this initial stage, then converts the bytecode to native code. From 0.95 onwards, GNU Classpath also supports compiling and running the newly GPLed open-source javac compiler using GNU Classpath and also allows the GNU Classpath class library, tools and examples to be compiled with javac itself.

Classes from the omg.org domain

Sun and GNU Corba interact in a two client game Interoperable software.png
Sun and GNU Corba interact in a two client game

GNU Classpath does not accept any code that has a non-free license, or that was automatically generated from code with a non-free license. The standard Java API contains numerous classes from the omg.org domain that are normally generated from the IDL files, released by the Object Management Group. The "use, but no modify" license of these files counts as non-free. For this reason, the mentioned classes in the GNU Classpath project were written from scratch, using only the official printed OMG specifications. Hence this part of GNU Classpath is as free as any other code in the project.

See also

Notes

  1. Fosdem 2006 included this and other demonstrations of data exchange between Sun's and Classpath implementations of CORBA. [8] The source code is available [9] in the Classpath repository.

Related Research Articles

The GNU Compiler for Java (GCJ) is a discontinued free compiler for the Java programming language. It was part of the GNU Compiler Collection.

A GPL linking exception modifies the GNU General Public License (GPL) in a way that enables software projects which provide library code to be "linked to" the programs that use them, without applying the full terms of the GPL to the using program. Linking is the technical process of connecting code in a library to the using code, to produce a single executable file. It is performed either at compile time or run-time in order to produce functional machine-readable code. The Free Software Foundation states that, without applying the linking exception, a program linked to GPL library code may only be distributed under a GPL-compatible license. This has not been explicitly tested in court, but linking violations have resulted in settlement. The license of the GNU Classpath project explicitly includes a statement to that effect.

Kaffe is a discontinued "clean room design" version of a Java Virtual Machine. It comes with a subset of the Java Platform, Standard Edition, Java API, and tools needed to provide a Java runtime environment. Like most other Free Java virtual machines, Kaffe uses GNU Classpath as its class library.

Free Java implementations are software projects that implement Oracle's Java technologies and are distributed under free software licences, making them free software. Sun released most of its Java source code as free software in May 2007, so it can now almost be considered a free Java implementation. Java implementations include compilers, runtimes, class libraries, etc. Advocates of free and open source software refer to free or open source Java virtual machine software as free runtimes or free Java runtimes.

A Java compiler is a compiler for the programming language Java. The most common form of output from a Java compiler is Java class files containing platform-neutral Java bytecode, but there are also compilers that output optimized native machine code for a particular hardware/operating system combination, most notably the now discontinued GNU Compiler for Java.

javac is the primary Java compiler included in the Java Development Kit (JDK) from Oracle Corporation. Martin Odersky implemented the GJ compiler, and his implementation became the basis for javac.

Apache Harmony is a retired open source, free Java implementation, developed by the Apache Software Foundation. It was announced in early May 2005 and on October 25, 2006, the board of directors voted to make Apache Harmony a top-level project. The Harmony project achieved 99% completeness for J2SE 5.0, and 97% for Java SE 6. The Android operating system has historically been a major user of Harmony, although since Android Nougat it increasingly relies on OpenJDK libraries.

JamVM is an open-source Java Virtual Machine (JVM) developed to be extremely small compared with other virtual machines (VMs) while conforming to the Java virtual machine specification version 2.

IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. IKVM is free software, distributed under the zlib permissive free software license.

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.

Mauve is a project to provide a free software test suite for the Java class libraries. Mauve is developed by the members of Kaffe, GNU Classpath, GCJ, and other projects. Unlike a similar project, JUnit, Mauve is designed to run on various experimental Java virtual machines, where some features may be still missing. Because of this, Mauve does not discover the testing method by name, as JUnit does. Mauve can also be used to test the user java application, not just the core class library. Mauve is released under GNU General Public License.

<span class="mw-page-title-main">Java (software platform)</span> 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.

OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GPL-2.0-only with a linking exception. Were it not for the GPL linking exception, components that linked to the Java Class Library would be subject to the terms of the GPL license. OpenJDK is the official reference implementation of Java SE since version 7.

The Java Class Library (JCL) is a set of dynamically loadable libraries that Java Virtual Machine (JVM) languages can call at run time. Because the Java Platform is not dependent on a specific operating system, applications cannot rely on any of the platform-native libraries. Instead, the Java Platform provides a comprehensive set of standard class libraries, containing the functions common to modern operating systems.

IcedTea is a build and integration project for OpenJDK launched by Red Hat in June 2007. IcedTea also includes some addon libraries: IcedTea-Web is a free software implementation of Java Web Start and the Java web browser applet plugin. IcedTea-Sound is a collection of plugins for the Java sound subsystem, including the PulseAudio provider which used to be included with IcedTea. The Free Software Foundation recommends that all Java programmers use IcedTea as their development environment.

libffi is a foreign function interface library. It provides a C programming language interface for calling natively compiled functions given information about the target function at run time instead of compile time. It also implements the opposite functionality: libffi can produce a pointer to a function that can accept and decode any combination of arguments defined at run time.

The Java Development Kit (JDK) is a distribution of Java Technology by Oracle Corporation. It implements the Java Language Specification (JLS) and the Java Virtual Machine Specification (JVMS) and provides the Standard Edition (SE) of the Java Application Programming Interface (API). It is derivative of the community driven OpenJDK which Oracle stewards. It provides software for working with Java applications. Examples of included software are the virtual machine, a compiler, performance monitoring tools, a debugger, and other utilities that Oracle considers useful for a Java programmer.

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.

References

  1. Hughes, Andrew John (2012-03-16). "GNU Classpath 0.99 Released!" (World Wide Web log). Fuseyism. Archived from the original on 2012-12-14. Retrieved 2012-03-20.
  2. GCJ applet viewer, Koders, archived from the original on 2009-09-18, retrieved 2009-09-14.
  3. "Jupiter", EECG, U Toronto.
  4. "GNU Classpath Library Coverage against OpenJDK6", J API, Fuseyism, archived from the original on 2015-09-06, retrieved 2012-05-31.
  5. "GNU Classpath Library Coverage against OpenJDK7", J API, Fuseyism, archived from the original on 2016-03-04, retrieved 2012-05-31.
  6. "GNU Classpath "95% and counting" 0.19 released", The GNU Project (announcement), Software, The Free Software Foundation, 2005-11-02, retrieved 31 May 2011.
  7. "The release of GNU Classpath 0.98 "Better Late Than Never", The GNU Project (announcement), Software, The Free Software Foundation, 2009-02-05.
  8. Fosdem (conference archive), Classpath, 2006.
  9. "Classpath", The GNU is Not Unix Project (source code) (example), The Free Software Foundation.