Java Class Library

From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search
File:Java platform.svg
Java Platform diagram

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.



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 [1], and so does not have to be included in the Classpath declared for the application.


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.


Following their promise to release a fully buildable JDK based almost completely on free and open source code in the first half of 2007 [2], 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.[3] 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.[4]

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[5], and less than 1% as of May 2008 and OpenJDK 6[6][7]) is[8] [9]:

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[9][10]. The closed-source software synthesizer has been replaced by a new synthesizer developed specifically for OpenJDK called Gervill[11],
  • All cryptography classes used in the Class library have been released as Open-source[12],
  • The code that scales and rasterizes fonts has been replaced by FreeType [13][14][15]
  • The native color management system has been replaced by LittleCMS [14]. 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[14][16][17]. This code is fully functional, but still needs some performance enhancements [18],
  • The Javascript plugin has been open-sourced (the JavaScript engine itself was open-sourced from the beginning)[19].

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

See also


  1. How Classes are Found
  3. "Open JDK is here!". Sun Microsystems. 2007-05-08. Retrieved 2007-05-09. 
  4. 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.
  5. Fitzsimmons, Thomas (2007-05-18). "Plans for OpenJDK". Retrieved 2007-05-22. 
  6. Angel, Lillian (2008-03-13). "OpenJDK to replace IcedTea in Fedora 9". Retrieved 2008-04-05. 
  7. Wade, Karsten (2008-03-13). "OpenJDK in Fedora 9!". 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." 
  8. Herron, David (2007-10-04). "Plans for OpenJDK". Retrieved 2007-10-09. 
  9. 9.0 9.1 9.2 "OpenJDK 6 b10 source posted". 2008-05-30. Retrieved 2008-06-01. 
  10. audio-engine project page
  11. "Gervill - Software Synthesizer". Retrieved 2008-06-01. 
  12. "Crypto has been added to OpenJDK". 2007-09-27. Retrieved 2007-10-07. 
  13. font-scaler projectpage
  14. 14.0 14.1 14.2 Java2D project page
  15. "Freetype font rasteriser". 2007-08-07. Retrieved 2007-11-24. 
  17. graphics-rasterizer project page
  18. Graham, Jim (2007-10-03). "Open Source rasterizer". Sun Microsystems. Retrieved 2007-05-09. 
  19. "Javascript is encumbered and there is no javascript plugin support.". IcedTea. 2008-03-11. Retrieved 2008-06-01. "Changing Summary. JavaScript is no longer encumbered, but we still need liveconnect support." 

External links

Template:Java (Sun) Template:Sun Microsystemsfr:Java Class Library

Personal tools

Served in 0.635 secs.