Java Platform, Standard Edition (Java SE) is a computing platform, technical standard for execution of applications on independent Java-supported platforms as such portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).
The platform uses the Java programming language and is part of the Java software-platform family. Java SE defines a range of general-purpose APIs—such as Java APIs for the Java Class Library—and also includes the Java Language Specification and the Java Virtual Machine Specification.
OpenJDK is the official reference implementation since version 7.
Contents
Nomenclature, standards and specifications
The platform was known as Java 2 Platform, Standard Edition or J2SE from version 1.2, until the name was changed to Java Platform, Standard Edition or Java SE in version 1.5. The "SE" is used to distinguish the base platform from the Enterprise Edition (Java EE) and Micro Edition (Java ME) platforms. The "2" was originally intended to emphasize the major changes introduced in version 1.2, but was removed in version 1.6. The naming convention has been changed several times over the Java version history. Starting with J2SE 1.4 (Merlin), Java SE has been developed under the Java Community Process, which produces descriptions of proposed and final specifications for the Java platform called Java Specification Requests (JSR). JSR 59 was the umbrella specification for J2SE 1.4 and JSR 176 specified J2SE 5.0 (Tiger). Java SE 6 (Mustang) was released under JSR 270.
Java Platform, Enterprise Edition (Java EE) is a related specification that includes all the classes in Java SE, plus a number that are more useful to programs that run on servers as opposed to workstations.
Java Platform, Micro Edition (Java ME) is a related specification intended to provide a certified collection of Java APIs for the development of software for small, resource-constrained devices such as cell phones, PDAs and set-top boxes.
The Java Runtime Environment (JRE) and Java Development Kit (JDK) are the actual files downloaded and installed on a computer to run or develop Java programs, respectively.
General purpose packages
The majority of these packages are exported by the java.base module of the Java Platform Module System (since Java 9).
java.lang
The Java package java.lang contains fundamental classes and interfaces closely tied to the language and runtime system. This includes the root classes that form the class hierarchy, types tied to the language definition, basic exceptions, math functions, threading, security functions, as well as some information on the underlying native system. This package contains 22 of 32 java.lang.Error classes provided in JDK 6.
The main classes and interfaces in java.lang are:
Object – the class that is the root of every class hierarchy.
Enum – the base class for enumeration classes (as of J2SE 5.0).
Class – the class that is the root of the Java reflective programming (reflection) system.
Throwable – the class that is the base class of the exception class hierarchy.
Error, Exception, and RuntimeException – the base classes for each exception type.
Thread – the class that allows operations on threads.
String – the class for strings and string literals.
StringBuffer and StringBuilder – classes for performing string manipulation (StringBuilder as of J2SE 5.0).
Comparable – the interface that allows generic comparison and ordering of objects (as of J2SE 1.2).
Iterable – the interface that allows generic iteration using the enhanced for loop (as of J2SE 5.0).
ClassLoader, Process, Runtime, SecurityManager, and System – classes that provide "system operations" that manage the dynamic loading of classes, creation of external processes, host environment inquiries such as the time of day, and enforcement of security policies.
java.io
The java.io package contains classes that support input and output. The classes in the package are primarily stream-oriented; however, a class for random access files is also provided. The central classes in the package are InputStream and OutputStream, which are abstract base classes for reading from and writing to byte streams, respectively. The related classes Reader and Writer are abstract base classes for reading from and writing to character streams, respectively. The package also has a few miscellaneous classes to support interactions with the host file system.
The stream classes follow the decorator pattern by extending the base subclass to add features to the stream classes. Subclasses of the base stream classes are typically named for one of the following attributes:
the source/destination of the stream data
the type of data written to/read from the stream
additional processing or filtering performed on the stream data
The stream subclasses are named using the naming pattern XxxStreamType where Xxx is the name describing the feature and StreamType is one of java.io.InputStream, java.io.OutputStream, java.io.Reader, or java.io.Writer.
The following table shows the sources/destinations supported directly by the java.io package:
Other standard library packages provide stream implementations for other destinations, such as the java.io.InputStream returned by the java.net.Socket.getInputStream() method or the Java EE javax.servlet.ServletOutputStream class.
Data type handling and processing or filtering of stream data is accomplished through stream filters. The filter classes all accept another compatible stream object as a parameter to the constructor and decorate the enclosed stream with additional features. Filters are created by extending one of the base filter classes FilterInputStream, FilterOutputStream, FilterReader, or FilterWriter.
java.nio
In J2SE 1.4, the package java.nio (NIO or Non-blocking I/O) was added to support memory-mapped I/O, facilitating I/O operations closer to the underlying hardware with sometimes dramatically better performance. The java.nio package provides support for a number of buffer types. The subpackage java.nio.charset provides support for different character encodings for character data. The subpackage java.nio.channels provides support for channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets. The java.nio.channels package also provides support for fine-grained locking of files.
java.math
The java.math package supports multiprecision arithmetic (including modular arithmetic operations) and provides multiprecision prime number generators used for cryptographic key generation. The main classes of the package are:
BigDecimal – provides arbitrary-precision signed decimal numbers. java.math.BigDecimal gives the user control over rounding behavior through java.math.RoundingMode.
BigInteger – provides arbitrary-precision integers. Operations on java.math.BigInteger do not overflow or lose precision. In addition to standard arithmetic operations, it provides modular arithmetic, GCD calculation, primality testing, prime number generation, bit manipulation, and other miscellaneous operations.
MathContext – encapsulate the context settings that describe certain rules for numerical operators.
RoundingMode – an enumeration that provides eight rounding behaviors.
java.net
The java.net package provides special IO routines for networks, allowing HTTP requests, as well as other common transactions.
java.text
The java.text package implements parsing routines for strings and supports various human-readable languages and locale-specific parsing.
java.util
Data structures that aggregate objects are the focus of the java.util package. Included in the package is the Collections API, an organized data structure hierarchy influenced heavily by the design patterns considerations.
Special purpose packages
java.applet
Created to support Java applet creation, the java.applet package lets applications be downloaded over a network and run within a guarded sandbox. Security restrictions are easily imposed on the sandbox. A developer, for example, may apply a digital signature to an applet, thereby labeling it as safe. Doing so allows the user to grant the applet permission to perform restricted operations (such as accessing the local hard drive), and removes some or all the sandbox restrictions. Digital certificates are issued by certificate authorities.
Because Java applets are now deprecated, this package is itself deprecated.
java.beans
Included in the java.beans package are various classes for developing and manipulating beans, reusable components defined by the JavaBeans architecture. The architecture provides mechanisms for manipulating properties of components and firing events when those properties change.
The APIs in java.beans are intended for use by a bean editing tool, in which beans can be combined, customized, and manipulated. One type of bean editor is a GUI designer in an integrated development environment.
java.awt
The java.awt, or Abstract Window Toolkit, provides access to a basic set of GUI widgets based on the underlying native platform's widget set, the core of the GUI event subsystem, and the interface between the native windowing system and the Java application. It also provides several basic layout managers, a datatransfer package for use with the Clipboard and Drag and Drop, the interface to input devices such as mice and keyboards, as well as access to the system tray on supporting systems. This package, along with javax.swing contains the largest number of enums (7 in all) in JDK 6.
java.rmi
The java.rmi package provides Java remote method invocation to support remote procedure calls between two java applications running in different JVMs.
java.security
Support for security, including the message digest algorithm, is included in the java.security package.
java.sql
An implementation of the JDBC API (used to access SQL databases) is grouped into the java.sql package.
javax.rmi
The javax.rmi package provided support for the remote communication between applications, using the RMI over IIOP protocol. This protocol combines RMI and CORBA features.
Java SE Core Technologies - CORBA / RMI-IIOP
javax.swing
Swing is a collection of routines that build on java.awt to provide a platform independent widget toolkit. javax.swing uses the 2D drawing routines to render the user interface components instead of relying on the underlying native operating system GUI support.
This package contains the largest number of classes (133 in all) in JDK 6. This package, along with java.awt also contains the largest number of enums (7 in all) in JDK 6. It supports pluggable looks and feels (PLAFs) so that widgets in the GUI can imitate those from the underlying native system. Design patterns permeate the system, especially a modification of the model–view–controller pattern, which loosens the coupling between function and appearance. One inconsistency is that (as of J2SE 1.3) fonts are drawn by the underlying native system, and not by Java, limiting text portability. Workarounds, such as using bitmap fonts, do exist. In general, "layouts" are used and keep elements within an aesthetically consistent GUI across platforms.
javax.swing.text.html.parser
The javax.swing.text.html.parser package provides the error tolerant HTML parser that is used for writing various web browsers and web bots.
javax.xml.bind.annotation
The javax.xml.bind.annotation package contained the largest number of Annotation Types (30 in all) in JDK 6. It defines annotations for customizing Java program elements to XML Schema mapping.
org.w3c
Java contains packages for World Wide Web Consortium utilities (primarily XML) under namespace org.w3c. Many of these exist in the java.xml module.
org.w3c.dom
The org.w3c.dom packages provide interfaces for the Document Object Model (DOM).
org.xml.sax
The org.xml.sax packages provide interfaces for the Simple API for XML (SAX).
org.omg
org.omg.CORBA
The org.omg.CORBA package provided support for the remote communication between applications using the General Inter-ORB Protocol and supports other features of the common object request broker architecture. Same as RMI and RMI-IIOP, this package is for calling remote methods of objects on other virtual machines (usually via network).
This package contained the largest number of java.lang.Exception classes (45 in all) in JDK 6. From all communication possibilities CORBA is portable between various languages; however, with this comes more complexity.
These packages were deprecated in Java 9 and removed from Java 11.
org.omg.PortableInterceptor
The org.omg.PortableInterceptor package contained the largest number of interfaces (39 in all) in JDK 6. It provides a mechanism to register ORB hooks through which ORB services intercept the normal flow of execution of the ORB.
Security
Several critical security vulnerabilities have been reported. Security alerts from Oracle announce critical security-related patches to Java SE.


