Pular para o conteúdo

Conheça Walt Disney World

Java Class Library

The Java Class Library is a set of dynamically loadable libraries that Java applications can call at run time. 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 useful facilities, such as container classes and regular expressions.
  • 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.

Contents

Architecture

The Java Class Library is almost entirely written in Java itself, 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 native interface wrappers to access the API of the operating system.

Almost all of the Java Class Library 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 be found in the classpath declared for the application. The runtime uses the bootstrap class loader to find the Java class library.

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.

Licensing

Before May 2007

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

OpenJDK release (May 2007)

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 was to replace the parts that remain proprietary and closed source with alternative implementations and make the Class Library completely free and open source.[4]

Before December 2010

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] [10]

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

After December 2010

Beginning in December 2010, all the so called binary plugs were replaced by open source replacements, making the whole JDK open sourced and the binary plugs not necessary anymore[21].

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 was another free software class library. Its aim was to also implement the other parts of the Java stack (Virtual Machine, Compiler, and other tools required for any Java implementation).

See also

References

  1. ^ How Classes are Found
  2. ^ http://www.sun.com/software/opensource/java/faq.jsp#b4
  3. ^ Rich Green (2007-05-08). "Open JDK is here!". Sun Microsystems. http://mail.openjdk.java.net/pipermail/announce/2007-May.txt. Retrieved 2011-11-25. 
  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. ^ "OpenJDK Binary Plugs". Sun Microsystems. 2007-05-08. http://openjdk.java.net/legal/binary-plugs-2007-05-08.html. Retrieved 2011-11-25. 
  6. ^ Fitzsimmons, Thomas (2007-05-18). "Plans for OpenJDK". http://fitzsim.org/blog/?p=17. Retrieved 2007-05-22. 
  7. ^ Angel, Lillian (2008-03-13). "OpenJDK to replace IcedTea in Fedora 9". http://langel.wordpress.com/2008/03/13/openjdk-in-fedora-9/. Retrieved 2008-04-05. 
  8. ^ Wade, Karsten (2008-03-13). "OpenJDK in Fedora 9!". redhatmagazine.com. http://developer.redhatmagazine.com/2008/03/12/openjdk-to-replace-icedtea-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." 
  9. ^ Herron, David (2007-10-04). "Plans for OpenJDK". http://weblogs.java.net/blog/robogeek/archive/2007/10/openjdk_encumbr.html. Retrieved 2007-10-09. 
  10. ^ a b c "OpenJDK 6 b10 source posted". 2008-05-30. http://mail.openjdk.java.net/pipermail/jdk6-dev/2008-May/000058.html. Retrieved 2008-06-01. 
  11. ^ audio-engine project page
  12. ^ "Gervill - Software Synthesizer". https://gervill.dev.java.net/. Retrieved 2008-06-01. 
  13. ^ "Crypto has been added to OpenJDK". 2007-09-27. http://mail.openjdk.java.net/pipermail/security-dev/2007-September/000015.html. Retrieved 2007-10-07. 
  14. ^ font-scaler projectpage
  15. ^ a b c Java2D project page
  16. ^ "Freetype font rasteriser". 2007-08-07. http://mail.openjdk.java.net/pipermail/font-scaler-dev/2007-August/000011.html. Retrieved 2007-11-24. 
  17. ^ phoneme.dev.java.net/
  18. ^ graphics-rasterizer project page
  19. ^ Graham, Jim (2007-10-03). "Open Source rasterizer". Sun Microsystems. http://mail.openjdk.java.net/pipermail/2d-dev/2007-October/000078.html. Retrieved 2007-05-09. 
  20. ^ "Javascript is encumbered and there is no javascript plugin support.". IcedTea. 2008-03-11. http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=85. Retrieved 2008-06-01. "Changing Summary. JavaScript is no longer encumbered, but we still need liveconnect support." 
  21. ^ Kelly O'Hair (December 2010). "OpenJDK7 and OpenJDK6 Binary Plugs Logic Removed". Oracle Corporation. http://mail.openjdk.java.net/pipermail/build-dev/2010-December/003881.html. Retrieved 2011-11-25. 

External links

Personal tools
  • Create account
  • Log in
Namespaces

Variants
Actions
Navigation
Toolbox
Print/export
Languages