HOME

TheInfoList



OR:

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 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 cros ...
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. JCL serves three purposes within the JVM: * Like other standard code libraries, they provide the programmer a well-known set of useful facilities, such as container classes and regular expression processing. * The library provides an abstract interface to tasks that would normally depend heavily on the hardware and operating system, such as
network Network, networking and networked may refer to: Science and technology * Network theory, the study of graphs as a representation of relations between discrete objects * Network science, an academic field that studies complex networks Mathematic ...
access and file access. * Some underlying platforms may not support all of the features a Java application expects. In these cases, the library implementation can either emulate those features or provide a consistent way to check for the presence of a specific feature.


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 upright=1, The Smiley, smiley face in the top left corner is a raster image. When enlarged, individual pixels appear as squares. Enlarging further, each pixel can be analyzed, with their colors constructed through combination of the values for ...
). The classes that give access to these functions commonly use Java Native Interface wrappers to access operating system
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
s. Almost all of JCL is stored in a single Java archive file called "rt.jar" which is provided with JRE and
JDK 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 ...
distributions. The Java Class Library (rt.jar) is located in the default bootstrap classpath 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 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 a ...
(part of the
Java 9 The Java language has undergone several changes since JDK 1.0 as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java language has been governed by the Java Community ...
release) broke the monolithic "rt.jar" JAR file and modularized the JCL itself in several modules with specified dependencies.


Conformance

Any Java implementation must pass the Java
Technology Compatibility Kit A Technology Compatibility Kit (TCK) is a suite of tests that at least nominally checks a particular alleged implementation of a Java Specification Request (JSR) for compliance. It is one of the three required pieces for a ratified JSR in the Java ...
tests for compliance, which includes JCL tests.


Main features

JCL Features are accessed through classes provided in
packages Package may refer to: Containers or Enclosures * Packaging and labeling, enclosing or protecting products * Mail, items larger than a letter * Chip package or chip carrier * Electronic packaging, in electrical engineering * Automotive package, ...
. * contains fundamental classes and
interfaces Interface or interfacing may refer to: Academic journals * ''Interface'' (journal), by the Electrochemical Society * '' Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics'' * '' Int ...
closely tied to the language and
runtime system In computer programming, a runtime system or runtime environment is a sub-system that exists both in the computer where a program is created, as well as in the computers where the program is intended to be run. The name comes from the compile ...
. * I/O and networking access the platform file system, and more generally networks through the , and packages. For networking,
SCTP The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the p ...
is available through . * Mathematics package: provides mathematical expressions and evaluation, as well as arbitrary-precision decimal and integer number datatypes. *
Collections Collection or Collections may refer to: * Cash collection, the function of an accounts receivable department * Collection (church), money donated by the congregation during a church service * Collection agency, agency to collect cash * Collection ...
and Utilities : built-in Collection data structures, and utility classes, for Regular expressions, Concurrency, logging and Data compression. * GUI and
2D Graphics 2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models (such as 2D geometric models, text, and digital images) and by techniques specific to them. It may refer to the branch of computer sc ...
: the AWT package () basic GUI operations and binds to the underlying native system. It also contains the 2D Graphics API. The
Swing Swing or swinging may refer to: Apparatus * Swing (seat), a hanging seat that swings back and forth * Pendulum, an object that swings * Russian swing, a swing-like circus apparatus * Sex swing, a type of harness for sexual intercourse * Swing ri ...
package () is built on AWT and provides a platform-independent
widget toolkit A widget toolkit, widget library, GUI toolkit, or UX library is a library or a collection of libraries containing a set of graphical control elements (called ''widgets'') used to construct the graphical user interface (GUI) of programs. Most widge ...
, as well as a Pluggable look and feel. It also deals with editable and non-editable text components. * Sound: interfaces and classes for reading, writing, sequencing, and synthesizing of sound data. * Text: deals with text, dates, numbers and messages. * Image package: and provide APIs to write, read, and modify images. *
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
: SAX, DOM, StAX, XSLT transforms, XPath and various APIs for Web services, as SOAP protocol and
JAX-WS The Jakarta XML Web Services (JAX-WS; formerly Java API for XML Web Services) is a Jakarta EE API for creating web services, particularly SOAP services. JAX-WS is one of the Java XML programming APIs. Overview The JAX-WS 2.2 specificatioJSR 2 ...
. * Security is provided by and encryption services are provided by . * Databases: access to SQL databases via * Access to Scripting engines: The package gives access to any conforming
Scripting language A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scriptin ...
. *
Applets In computing, an applet is any small application that performs one specific task that runs within the scope of a dedicated widget engine or a larger program, often as a plug-in. The term is frequently used to refer to a Java applet, a program ...
: allows applications to be downloaded over a network and run within a guarded sandbox * Java Beans: provides ways to manipulate reusable components. * Introspection and reflection:
java.lang.Class
represents a class, but other classes such as Method and Constructor are available in .


Licensing


Prior licenses

Before the release of OpenJDK, the
JDK 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 ...
was based on a
proprietary license Proprietary software is software that is deemed within the free and open-source software to be non-free because its creator, publisher, or other rightsholder or rightsholder partner exercises a legal monopoly afforded by modern copyright and int ...
. Following their promise to release a fully buildable
JDK 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 ...
based on almost completely free and open-source code in the first half of 2007, 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. 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 The Sun is the star at the center of the Solar System. It is a nearly perfect ball of hot plasma, heated to incandescence by nuclear fusion reactions in its core. The Sun radiates this energy mainly as light, ultraviolet, and infrared radi ...
then Oracle as ''Binary Plugs'' which were required to build the JDK but not necessary to run it. , the only part of the Class library that remained proprietary and closed-source (4% for OpenJDK 7, and less than 1% and OpenJDK 6) was: * The SNMP implementation. 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: * All the audio engine code, including the software synthesizer, became open source. The closed-source software synthesizer has been replaced by a new synthesizer developed specifically for OpenJDK called ''Gervill'', * All
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adve ...
classes were released as open-source, * The code that scales and rasterizes
fonts In metal typesetting, a font is a particular size, weight and style of a typeface. Each font is a matched set of type, with a piece (a "sort") for each glyph. A typeface consists of a range of such fonts that shared an overall design. In mode ...
uses open source FreeTypeJava2D project page
/ref> * The native
color management In digital imaging systems, color management (or colour management) is the controlled conversion between the color representations of various devices, such as image scanners, digital cameras, monitors, TV screens, film printers, computer printe ...
uses open-source
LittleCMS Little CMS or LCMS is an open-source color management system, released as a software library for use in other programs which will allow the use of International Color Consortium profiles. It is licensed under the terms of the MIT License. LCMS w ...
. There is a pluggable layer in the JDK, so that the commercial release of Java can use the original, proprietary color management system and OpenJDK can use LittleCMS. * The
anti-aliasing Anti-aliasing may refer to any of a number of techniques to combat the problems of aliasing in a sampled signal such as a digital image or digital audio recording. Specific topics in anti-aliasing include: * Anti-aliasing filter, a filter used be ...
graphics
rasterizer In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, whic ...
code uses the open source Pisces renderer used in the
phoneME In phonology and linguistics, a phoneme () is a unit of sound that can distinguish one word from another in a particular language. For example, in most dialects of English, with the notable exception of the West Midlands and the north-west ...
project. * The JavaScript plugin is open source (the
JavaScript engine A JavaScript engine is a software component that executes JavaScript code. The first JavaScript engines were mere interpreters, but all relevant modern engines use just-in-time compilation for improved performance. JavaScript engines are typical ...
itself was open source from the beginning).


Open source release

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


Alternative implementations

GNU 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 p ...
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 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 ...
was another free software class library. Its aim was to implement the other parts of the Java stack ( Virtual Machine,
Compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs th ...
, and other tools required for any Java implementation).


See also

* Java Platform, Standard Edition *
List of Java APIs There are two types of Java programming language application programming interfaces (APIs): * The official core Java API, contained in the Android (Google), SE (OpenJDK and Oracle), MicroEJ. These packages (java.* packages) are the core Java la ...
* OpenJDK *
Free Java implementations 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 c ...
* Standard library *
Java applet Java applets were small applications written in the Java programming language, or another programming language that compiles to Java bytecode, and delivered to users in the form of Java bytecode. The user launched the Java applet from a ...


References


External links


Java SE Main page
*

* Java software development kits (status ): *
1.7
(early development) *
1.6
(stable, current) *
1.5
(stable) *
1.4
(stable) *
1.3
(obsolete) {{Sun Microsystems Java (programming language) Java (programming language) libraries