[Home]Java API

HomePage | Recent Changes | Preferences

Showing revision 6
The Java API is an extensive collection of library routines (written in the Java programming language or in native code) that perform basic tasks such as GUI display and manipulation, sorting and countless others. The libraries make it considerably easier to program in Java than in C++, according to some software development methodologists; however, other experts attribute the difference primarily to the presence of garbage collection because common libraries for other languages often have similar function to the Java API.

Sun holds complete legal control over the APIs that all Java platforms must support. As of Java Development Kit v1.3, the major APIs are:

java.io
Routines for normal input and output. This includes streams and filehandling.

java.lang
Access to the internals of the language, as well as some information on the underlying native system. For example, one can use Reflection to call classes and methods by just knowing their names.

java.lang.ref
Special routines for interacting with the garbage collector. For example, one can create a weak reference, which allows one to refer to an object, without preventing the garbage collector from cleaning it up. This is useful in caches, where if nothing else refers to an object held by the cache, the garbage collector may clean it up at whim.

java.math
Numerical routines.

java.net
Special IO routines for networks. This includes the ability to easily request HTML pages, as well as other common transactions.

java.text
Parsing routines for strings. Support for different human-readable languages and locale-specific parsing is also included.

java.util
Routines for useful data structures. These data structures aggregate objects, with varying useful properties. Also includes the Collections API, which is a very organized way to handle data structures, influenced heavily by the Design Patterns community.

java.beans
Routines to call code dynamically.

java.applet
Routines to create Applets. Applets allow applications to be downloaded over a network and run within a guarded sandbox. Security restrictions may be applied to applets, so they are not allowed to execute potentially hostile code from within the sandbox.

java.awt
Routines to create basic GUIs. These GUIs use basic windows from the underlying native system.

javax.swing
Swing is a collection of routines that build upon java.awt. It uses 2D drawing routines to exercise greater control over new windows than the underlying native platform normally allows. The cost of this flexibility is that Swing elements may not exist outside of java.awt windows.

HomePage | Recent Changes | Preferences
This page is read-only | View other revisions | View current revision
Edited December 12, 2001 9:52 pm by Forgotten gentleman (diff)
Search: