Java Class Library

Last updated

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.

Contents

JCL serves three purposes within the JVM:

Implementation and configuration

JCL is almost entirely written in Java, except for the parts that need direct access to the hardware and operating system (such as for I/O or bitmap graphics). The classes that give access to these functions commonly use Java Native Interface wrappers to access operating system APIs.

Almost all of JCL is stored in a single Java archive file called "rt.jar" which is provided with JRE and JDK distributions. The Java Class Library (rt.jar) is located in the default bootstrap classpath [1] and does not have to appear in the classpath declared for the application. The runtime uses the bootstrap class loader to find the JCL.

The Java Module System (part of the Java 9 release) broke the monolithic "rt.jar" JAR file and modularized the JCL itself in several modules with specified dependencies. [2]

Conformance

Any Java implementation must pass the Java Technology Compatibility Kit tests for compliance, which includes JCL tests.

Main features

JCL Features are accessed through classes provided in packages.

Licensing

Prior licenses

Before the release of OpenJDK, the JDK was based on a proprietary license.

Following their promise to release a fully buildable JDK based on almost completely free and open-source code in the first half of 2007, [3] Sun released the complete source code of the Class Library under the GPL on May 8, 2007, except some limited parts that were licensed by Sun from third parties who did not want their code to be released under an open-source license. [4] Sun's goal was to replace the parts that remain proprietary and closed source with alternative implementations and make the Class Library completely free and open source.

Until December 2010, the remaining encumbered part of the JDK was made available by Sun then Oracle as Binary Plugs [5] which were required to build the JDK but not necessary to run it. as of May 2007, the only part of the Class library that remained proprietary and closed-source (4% as of May 2007 for OpenJDK 7, [6] and less than 1% as of May 2008 and OpenJDK 6 [7] [8] ) was [9] the SNMP implementation. [10]

Since the first May 2007 release, Sun, with the help of the community, released as open-source or replaced with open-source alternatives almost all the encumbered code:

Open source release

Beginning in December 2010, all the so-called binary plugs were replaced by open source replacements, making the entire JDK open. [20]

Alternative implementations

GNU Classpath is the other main free software class library for Java. Contrary to other implementations, it only implements the Class Library, and is used by many free Java runtimes (like Kaffe, SableVM, JamVM).

Apache Harmony was another free software class library. Its aim was to implement the other parts of the Java stack (Virtual Machine, Compiler, and other tools required for any Java implementation).

See also

Related Research Articles

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

Java Platform, Standard Edition is a computing platform for development and deployment of portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).

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

<span class="mw-page-title-main">Swing (Java)</span> Java-based GUI toolkit

Swing is a GUI widget toolkit for Java. It is part of Oracle's Java Foundation Classes (JFC) – an API for providing a graphical user interface (GUI) for Java programs.

<span class="mw-page-title-main">GNU Classpath</span> Implementation of standard class library of Java

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.

<span class="mw-page-title-main">Standard Widget Toolkit</span> Graphical widget toolkit for use with the Java platform

The Standard Widget Toolkit (SWT) is a graphical widget toolkit for use with the Java platform. It was originally developed by Stephen Northover at IBM and is now maintained by the Eclipse Foundation in tandem with the Eclipse IDE. It is an alternative to the Abstract Window Toolkit (AWT) and Swing Java graphical user interface (GUI) toolkits provided by Sun Microsystems as part of the Java Platform, Standard Edition (J2SE).

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.

Java TV is a Java-based software framework designed for use on TV set-top boxes, based on components called Xlets. It is currently used only on the Connected Device Configuration, specifically for iTV applications development.

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.

<span class="mw-page-title-main">Java Media Framework</span>

The Java Media Framework (JMF) is a Java library that enables audio, video and other time-based media to be added to Java applications and applets. This optional package, which can capture, play, stream, and transcode multiple media formats, extends the Java Platform, Standard Edition and allows development of cross-platform multimedia applications.

<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 that provides a software platform 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.

BD-J, or Blu-ray Disc Java, is a specification supporting Java ME Xlets for advanced content on Blu-ray Disc and the Packaged Media profile of Globally Executable MHP (GEM).

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.

Comparison of the Java and .NET platforms.

The Java Platform Module System specifies a distribution format for collections of Java code and associated resources. It also specifies a repository for storing these collections, or modules, and identifies how they can be discovered, loaded and checked for integrity. It includes features such as namespaces with the aim of fixing some of the shortcomings in the existing JAR format, especially the JAR Hell, which can lead to issues such as classpath and class loading problems.

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.

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.

<span class="mw-page-title-main">Abstract Window Toolkit</span> Java-based GUI toolkit

The Abstract Window Toolkit (AWT) is Java's original platform-dependent windowing, graphics, and user-interface widget toolkit, preceding Swing. The AWT is part of the Java Foundation Classes (JFC) — the standard API for providing a graphical user interface (GUI) for Java program. AWT is also the GUI toolkit for a number of Java ME profiles. For example, Connected Device Configuration profiles require Java runtimes on mobile telephones to support the Abstract Window Toolkit.

References

  1. "How Classes are Found". Oracle Corporation . Retrieved 2015-12-05.
  2. "JDK Module Summary". Oracle Corporation. 2015-10-23. Archived from the original on 2015-12-08. Retrieved 2015-11-29.
  3. http://www.sun.com/software/opensource/java/faq.jsp#b4
  4. Rich Green (2007-05-08). "Open JDK is here!". Sun Microsystems . Retrieved 2011-11-25.
  5. "OpenJDK Binary Plugs". Sun Microsystems. 2007-05-08. Archived from the original on 2012-08-26. Retrieved 2011-11-25.
  6. Fitzsimmons, Thomas (2007-05-18). "Plans for OpenJDK" . Retrieved 2007-05-22.
  7. Angel, Lillian (2008-03-13). "OpenJDK to replace IcedTea in Fedora 9". Archived from the original on 2012-12-10. Retrieved 2008-04-05.
  8. Wade, Karsten (2008-03-13). "OpenJDK in Fedora 9!". redhatmagazine.com. Archived from the original on 2008-04-21. Retrieved 2008-04-05. Thomas Fitzsimmons updated the Fedora 9 release notes source pages to reflect that Fedora 9 would ship with OpenJDK 6 instead of the IcedTea implementation of OpenJDK 7. Fedora 9 (Sulphur) is due to release in May 2008.
  9. Herron, David (2007-10-04). "Plans for OpenJDK". Archived from the original on 2007-10-11. Retrieved 2007-10-09.
  10. 1 2 "OpenJDK 6 b10 source posted". 2008-05-30. Retrieved 2008-06-01.
  11. audio-engine project page
  12. "Gervill – Software Synthesizer". Archived from the original on 2011-10-04. Retrieved 2008-06-01.
  13. "Crypto has been added to OpenJDK". 2007-09-27. Retrieved 2007-10-07.
  14. font-scaler projectpage
  15. 1 2 3 Java2D project page
  16. "Freetype font rasteriser". 2007-08-07. Retrieved 2007-11-24.
  17. phoneme.dev.java.net/ Archived 2007-06-10 at the Wayback Machine
  18. graphics-rasterizer project page
  19. "Javascript is encumbered and there is no javascript plugin support". IcedTea. 2008-03-11. Archived from the original on 2008-09-27. Retrieved 2008-06-01. Changing Summary. JavaScript is no longer encumbered, but we still need liveconnect support.
  20. Kelly O'Hair (December 2010). "OpenJDK7 and OpenJDK6 Binary Plugs Logic Removed". Oracle Corporation . Retrieved 2011-11-25.