Java Class Library

Java Class Library

The Java Class Library is a set of dynamically loadable libraries that Java applications can call at runtime. Because the Java Platform is not dependent on any specific operating system, applications cannot rely on any of the existing libraries. Instead, the Java Platform provides a comprehensive set of standard class libraries, containing much of the same reusable functions commonly found in modern operating systems.

The Java class libraries serve three purposes within the Java Platform:
* Like other standard code libraries, they provide the programmer a well-known set of functions to perform common tasks, such as maintaining lists of items or performing complex string parsing.
* In addition, the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily dependent on the native capabilities of the platform.
* Finally, some underlying platforms may not support all of the features a Java application expects. In these cases, the class libraries can either emulate those features using whatever is available, or provide a consistent way to check for the presence of a specific feature.

Architecture

The Java Class Library is almost entirely written in Java itself, except the parts that need to have direct access to the hardware and operating system (as for I/O, or Graphic Rasterisation). The Java classes that give access to these functions commonly use JNI wrappers to access the native API of the operating system.

Mostly all the Java classes of the library are contained in a single Jar file contained in the JRE or JDK distribution, called "rt.jar". Contrary to other libraries used by an application, the Class Library contained in "rt.jar" is in the default Bootstrap Classpath [ [http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html How Classes are Found] ] , and so does not have to be included in the Classpath declared for the application.

Conformance

Any Java implementation must pass the Java Technology Compatibility Kit tests for compliance.

Main Features

Features of the Class Library are accessed through classes grouped by packages.
* contains fundamental classes and interfaces closely tied to the language and runtime system.
* I/O and networking: access to the platform file system, and more generally to networks, is provided through the Javadoc:SE|package=java.io|java/io, Javadoc:SE|package=java.nio|java/nio, and Javadoc:SE|package=java.net|java/net packages.
* Mathematics package: Javadoc:SE|package=java.math|java/math provides regular mathematical expressions, as well as arbitrary-precision decimals and integers numbers.
* Collections and Utilities : provide built-in Collection data structures, and various utility classes, for Regular expressions, Concurrency, logging and Data compression.
* GUI and 2D Graphics: the Javadoc:SE|package=java.awt|java/awt package supports basic GUI operations and binds to the underlying native system. It also contains the 2D Graphics API. The Javadoc:SE|package=javax.swing|javax/swing package is built on AWT and provides a platform independent widget toolkit, as well as a Pluggable look and feel. It also deals with editable and non-editable text components.
* Sound: provides interfaces and classes for reading, writing, sequencing, and synthesizing of sound data.
* Text: the Javadoc:SE|package=java.text|java/text package deals with text, dates, numbers, and messages.
* Image package: Javadoc:SE|package=java.awt.image|java/awt/image and Javadoc:SE|package=javax.imageio|javax/imageio provide APIs to write, read, and modify images.
* XML: built-in classes handle SAX, DOM, StAX, XSLT transforms, XPath, and various APIs for Web services, as SOAP protocol and JAX-WS.
* CORBA and RMI APIs, including a built-in ORB
* Security and Cryptography
* Databases: access to SQL databases is provided through the Javadoc:SE|package=java.sql|java/sql package.
* Access to Scripting engines: the Javadoc:SE|package=javax.script|javax/script package gives access any Scripting language that conforms to this API.
* Applets: Javadoc:SE|package=java.applet|java/applet allows applications to be downloaded over a network and run within a guarded sandbox
* Java Beans: Javadoc:SE|package=java.beans|java/beans provides ways to manipulate reusable components.

Licensing

Following their promise to release a fully buildable JDK based almost completely on free and open source code in the first half of 2007 [http://www.sun.com/software/opensource/java/faq.jsp#b4] , 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 a free and open-source license. [cite web
url=http://mail.openjdk.java.net/pipermail/announce/2007-May.txt
title=Open JDK is here!
publisher=Sun Microsystems
date=2007-05-08
accessdate=2007-05-09
] Sun's goal is to replace the parts that remain proprietary and closed source with alternative implementations and make the Class Library completely free and open source. [Since there's some encumbered code in the JDK, Sun will continue to use that code in commercial releases until it is replaced by fully-functional free and open-source alternatives.]

As of May 2008, the only part of the Class library that remain proprietary and closed-source (4% as of May 2007 for OpenJDK 7 [cite web
url=http://fitzsim.org/blog/?p=17
title=Plans for OpenJDK
last=Fitzsimmons|first=Thomas
date=2007-05-18
accessdate=2007-05-22
] , and less than 1% as of May 2008 and OpenJDK 6cite web
url=http://langel.wordpress.com/2008/03/13/openjdk-in-fedora-9/
title=OpenJDK to replace IcedTea in Fedora 9
last=Angel|first=Lillian
date=2008-03-13
accessdate=2008-04-05
] cite web
url=http://developer.redhatmagazine.com/2008/03/12/openjdk-to-replace-icedtea-in-fedora-9/
title=OpenJDK in Fedora 9!
last=Wade|first=Karsten
publisher=redhatmagazine.com
quote="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."
date=2008-03-13
accessdate=2008-04-05
] ) is [cite web
url=http://weblogs.java.net/blog/robogeek/archive/2007/10/openjdk_encumbr.html
title=Plans for OpenJDK
last=Herron|first=David
date=2007-10-04
accessdate=2007-10-09
] cite web
url=http://mail.openjdk.java.net/pipermail/jdk6-dev/2008-May/000058.html
title=OpenJDK 6 b10 source posted
date=2008-05-30
accessdate=2008-06-01
] :
* The SNMP implementation.

Since the first May 2007 release, Sun Microsystems, with the help of the community, has released as Open-source or replaced with Open-source alternatives almost all the encumbered code:
* All the audio engine code, including the software synthetizer, has been released as Open-source [ [http://openjdk.java.net/projects/audio-engine/ audio-engine project page] ] . The closed-source software synthesizer has been replaced by a new synthesizer developed specifically for OpenJDK called "Gervill" [cite web
url=https://gervill.dev.java.net/
title=Gervill - Software Synthesizer
accessdate=2008-06-01
] ,
* All cryptography classes used in the Class library have been released as Open-source [cite web
url=http://mail.openjdk.java.net/pipermail/security-dev/2007-September/000015.html
title=Crypto has been added to OpenJDK
date=2007-09-27
accessdate=2007-10-07
] ,
* The code that scales and rasterizes fonts has been replaced by FreeType [ [http://openjdk.java.net/projects/font-scaler/ font-scaler projectpage] ] [http://openjdk.java.net/groups/2d/ Java2D project page] ] [cite web
url=http://mail.openjdk.java.net/pipermail/font-scaler-dev/2007-August/000011.html
title=Freetype font rasteriser
date=2007-08-07
accessdate=2007-11-24
]
* The native color management system has been replaced by LittleCMS . There is a pluggable layer in the JDK, so that the commercial version can use the old color management system and OpenJDK can use LittleCMS.
* The anti-aliasing graphics rasterizer code has been replaced by the Open-sourced Pisces renderer used in the phoneME project [ [https://phoneme.dev.java.net/ phoneme.dev.java.net/] ] [ [http://openjdk.java.net/projects/graphics-rasterizer/ graphics-rasterizer project page] ] . This code is fully functional, but still needs some performance enhancements [cite web
url=http://mail.openjdk.java.net/pipermail/2d-dev/2007-October/000078.html
title=Open Source rasterizer
publisher=Sun Microsystems
last=Graham|first=Jim
date=2007-10-03
accessdate=2007-05-09
] ,
* The Javascript plugin has been open-sourced (the JavaScript engine itself was open-sourced from the beginning) [cite web
url=http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=85
title=Javascript is encumbered and there is no javascript plugin support.
publisher=IcedTea
quote="Changing Summary. JavaScript is no longer encumbered, but we still need liveconnect support."
date=2008-03-11
accessdate=2008-06-01
] .

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, CACAO).

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

References

ee also

*Java Platform, Standard Edition
*List of Java APIs
*OpenJDK
*Free Java implementations
*Standard library

External links

* [http://java.sun.com/j2se/ Java SE Main page]
*
* [http://java.sun.com/reference/api/index.html Java SE API documentation]
* Java software development kits (status as of August 2006):
** [https://jdk7.dev.java.net/ 1.7] (early development)
** [http://java.sun.com/javase/6/ 1.6] (stable, current)
** [http://java.sun.com/j2se/1.5.0/ 1.5] (stable)
** [http://java.sun.com/j2se/1.4.2/ 1.4] (stable)
** [http://java.sun.com/j2se/1.3/ 1.3] (obsolete)


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Java Class Library — Le Java Class Library (JCL) est une bibliothèque standard du langage Java, qui contient un ensemble de bibliothèques logicielles chargées dynamiquement. Le JCL a plusieurs buts : Comme les bibliothèques standard des autres langages, il… …   Wikipédia en Français

  • Base Class Library — Base Class Library, сокращённо BCL  стандартная библиотека классов платформы «.NET Framework». Программы, написанные на любом из языков, поддерживающих платформу .NET, могут пользоваться классами и методами BCL  создавать объекты… …   Википедия

  • Base Class Library — The Base Class Library (BCL) is a standard library available to all languages using the .NET Framework. In order to make the programmer s job easier, .NET includes the BCL in order to encapsulate a large number of common functions, such as file… …   Wikipedia

  • Base Class Library — La Base Class Library (BCL) de Microsoft est une bibliothèque standard utilisée par tous les langages basés sur .NET Framework. Pour faciliter le travail du programmeur, .NET utilise la BCL pour encapsuler un grand nombre de fonctions communes,… …   Wikipédia en Français

  • Framework Class Library — The Framework Class Library (FCL) is a standard library and one of two core components of Microsoft .NET Framework. The FCL is a collection of thousands of reusable classes (within hundreds of namespaces), interfaces and value types. BCL(Base… …   Wikipedia

  • Unified Class Library — With the introduction of .NET, Microsoft redesigned the access to common system components and services such as XML web services, Enterprise Services, ADO.NET, and XML by creating a single object oriented library. All the Microsoft Visual .NET… …   Wikipedia

  • Java Platform, Standard Edition — or Java SE is a widely used platform for programming in the Java language. It is the Java Platform used to deploy portable applications for general use.In practical terms, Java SE consists of a virtual machine, which must be used to run Java… …   Wikipedia

  • Microsoft Foundation Class Library — Developer(s) Microsoft Initial release 1992 Stable release 10.0.40219.1 [1] …   Wikipedia

  • Java (software platform) — Not to be confused with JavaScript. Java Original author(s) Oracle Corporation Developer(s) James Gosling / Sun Microsystems …   Wikipedia

  • Java performance — Programs written in Java have had a reputation for being slower and requiring more memory than those written in natively compiled languages such as C or C++ (see e.g. [cite web url=http://www.jelovic.com/articles/why java is slow.htm title=Why… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”