The Core Java API Packages
At the time of this writing, Table 30-1 lists all of the core API packages defined by Java (those in the java namespace) and summarizes their functions.
Package :- Primary Function
java.applet :- Supports construction of applets.
java.awt :- Provides capabilities for graphical user interfaces.
java.awt.color :- Supports color spaces and profiles.
java.awt.datatransfer :- Transfers data to and from the system clipboard.
java.awt.dnd :- Supports drag-and-drop operations.
java.awt.event :- Handles events.
java.awt.font :- Represents various types of fonts.
java.awt.geom :- Allows you to work with geometric shapes.
java.awt.im :- Allows input of Japanese, Chinese, and Korean characters to text editing components.
java.awt.im.spi :- Supports alternative input devices.
java.awt.image :- Processes images.
java.awt.image.renderable :- :- Supports rendering-independent images.
java.awt.print :- Supports general print capabilities.
java.beans :- Allows you to build software components.
java.beans.beancontext :- Provides an execution environment for Beans.
java.io :- Inputs and outputs data.
java.lang :- Provides core functionality.
java.lang.annotation :- Supports annotations (metadata).
java.lang.instrument :- Supports program instrumentation.
java.lang.invoke :- Supports dynamic languages.
java.lang.management :- Supports management of the execution environment.
java.lang.ref :- Enables some interaction with the garbage collector.
java.lang.reflect :- Analyzes code at run time.
java.math :- Handles large integers and decimal numbers.
java.net :- Supports networking.
java.nio :- Top-level package for the NIO classes. Encapsulates buffers.
java.nio.channels :- Encapsulates channels, which are used by the NIO system.
java.nio.channels.spi :- Supports service providers for channels.
java.nio.charset :- Encapsulates character sets.
java.nio.charset.spi :- Supports service providers for character sets.
java.nio.file :- Provides NIO support for files.
java.nio.file.attribute:- Supports NIO file attributes.
java.nio.file.spi :- Supports NIO service providers for files.
java.rmi :- Provides remote method invocation.
java.rmi.activation :- Activates persistent objects.
java.rmi.dgc :- Manages distributed garbage collection.
java.rmi.registry :- Maps names to remote object references.
java.rmi.server :- Supports remote method invocation.
java.security :- Handles certificates, keys, digests, signatures, and other security functions.
java.security.acl :- Manages access control lists.
java.security.cert :- Parses and manages certificates.
java.security.interfaces :- Defines interfaces for DSA (Digital Signature Algorithm) keys.
java.security.spec :- Specifies keys and algorithm parameters.
java.sql :- Communicates with a SQL (Structured Query Language) database.
java.text :- Formats, searches, and manipulates text.
java.text.spi :- Supports service providers for text formatting classes in java.text.
java.time :- Primary support for the new date and time API. (Added by JDK 8.)
java.time.chrono :- Supports alternative, non-Gregorian calendars. (Added by JDK 8.)
java.time.format :- Supports date and time formatting. (Added by JDK 8.)
java.time.temporal :- Supports extended date and time functionality. (Added by JDK 8.)
java.time.zone :- Supports time zones. (Added by JDK 8.)
java.util :- Contains common utilities.
java.util.concurrent :- Supports the concurrent utilities.
java.util.concurrent.atomic :- Supports atomic (that is, indivisible) operations on variables without the use of locks.
java.util.concurrent.locks :- Supports synchronization locks.
java.util.function :- Provides several functional interfaces. (Added by JDK 8.)
java.util.jar :- Creates and reads JAR files.
java.util.logging :- Supports logging of information related to a program’s execution.
java.util.prefs :- Encapsulates information relating to user preference.
java.util.regex :- Supports regular expression processing.
java.util.spi :- Supports service providers for the utility classes in java.util.
java.util.stream :- Supports the new stream API. (Added by JDK 8.)
java.util.zip :- Reads and writes compressed and uncompressed ZIP files.
Table 30-1 The Core Java API Packages