- Lambda Expressions.
- Method references.
- Default methods.
- Repeating Annotations.
- Type Annotations.
- Improved type inference.
- Method parameter reflection.
- New and Enhanced APIs That Take Advantage of Lambda Expressions and Streams (
java.util.stream package
). - Performance Improvement for HashMaps with Key Collisions.
- Classes and interfaces have been added to the
java.util.concurrent
package.- Interface
CompletableFuture.AsynchronousCompletionTask
: A marker interface identifying asynchronous tasks produced by async methods. - Interface
CompletionStage<T>
: A stage of a possibly asynchronous computation, that performs an action or computes a value when anotherCompletionStage
completes. - Class
CompletableFuture<T>
: A Future that may be explicitly completed (setting its value and status), and may be used as aCompletionStage
, supporting dependent functions and actions that trigger upon its completion. - Class
ConcurrentHashMap.KeySetView<K,V>
: A view of aConcurrentHashMap
as aSet
of keys, in which additions may optionally be enabled by mapping to a common value. - Class
CountedCompleter<T>
: AForkJoinTask
with a completion action performed when triggered and there are no remaining pending actions. - Class
CompletionException
: Exception thrown when an error or other exception is encountered in the course of completing a result or task.
- Interface
- Methods have been added to the
java.util.concurrent.ConcurrentHashMap
class to support aggregate operations based on the newly added streams facility and lambda expressions. - Classes have been added to the
java.util.concurrent.atomic
package to support scalable updatable variables. - Methods have been added to the
java.util.concurrent.ForkJoinPool
class to support a common pool. - The
java.util.concurrent.locks.StampedLock
class has been added to provide a capability-based lock with three modes for controlling read/write access.
java.time
- Classes for date, time, date and time combined, time zones, instants, duration, and clocks.java.time.chrono
- API for representing calendar systems other than ISO-8601. Several predefined chronologies are provided and you can also define your own chronology.java.time.format
- Classes for formatting and parsing dates and time.java.time.temporal
- Extended API, primarily for framework and library writers, allowing interoperations between the date and time classes, querying, and adjustment. Fields and units are defined in this package.java.time.zone
- Classes that support time zones, offsets from time zones, and time zone rules.- JSR 310: Date and Time API
- Parallel Array Sorting
- Standard Encoding and Decoding Base64
- Unsigned Arithmetic Support
- The JDBC-ODBC Bridge has been removed.
- JDBC 4.2 introduces new features.
- JDK 8 includes Java DB 10.10.
- The class
java.net.URLPermission
has been added. - In the class
java.net.HttpURLConnection
, if a security manager is installed, calls that request to open a connection require permission.
- New
SelectorProvider
implementation for Solaris based on the Solaris event port mechanism. To use, run with the system propertyjava.nio.channels.spi.Selector
set to the valuesun.nio.ch.EventPortSelectorProvider
. - Decrease in the size of the
<JDK_HOME>/jre/lib/charsets.jar
file - Performance improvement for the
java.lang.String(byte[], *)
constructor and thejava.lang.String.getBytes()
method.
-
Hardware intrinsics were added to use Advanced Encryption Standard (AES). The
UseAES
andUseAESIntrinsics
flags are available to enable the hardware-based AES intrinsics for Intel hardware. The hardware must be 2010 or newer Westmere hardware.- Note: AES intrinsics are only supported by the Server VM.
- For example, to enable hardware AES, use the following flags:
-XX:+UseAES -XX:+UseAESIntrinsics
- To disable hardware AES use the following flags:
-XX:-UseAES -XX:-UseAESIntrinsics
-
Removal of PermGen.
-
Default Methods in the Java Programming Language are supported by the byte code instructions for method invocation.
- Client-side TLS 1.2 enabled by default.
- New variant of
AccessController.doPrivileged
that enables code to assert a subset of its privileges, without preventing the full traversal of the stack to check for other permissions. - Stronger algorithms for password-based encryption.
- SSL/TLS Server Name Indication (SNI) Extension support in JSSE Server.
- Support for AEAD algorithms.
- KeyStore enhancements.
- SHA-224 Message Digests.
- Enhanced Support for NSA Suite B Cryptography.
- Better Support for High Entropy Random Number Generation.
- New
java.security.cert.PKIXRevocationChecker
class for configuring revocation checking of X.509 certificates. - 64-bit PKCS11 for Windows.
- New rcache Types in Kerberos 5 Replay Caching.
- Support for Kerberos 5 Protocol Transition and Constrained Delegation.
- Kerberos 5 weak encryption types disabled by default.
- Unbound SASL for the GSS-API/Kerberos 5 mechanism.
- SASL service for multiple host names.
- JNI bridge to native JGSS on Mac OS X.
- Support for stronger strength ephemeral DH keys in the SunJSSE provider.
- Support for server-side cipher suites preference customization in JSSE.
- The
jjs
command is provided to invoke the Nashorn engine. - The
java
command launches JavaFX applications. - The
java
man page has been reworked. - The
jdeps
command-line tool is provided for analyzing class files. - Java Management Extensions (JMX) provide remote access to diagnostic commands.
- The
jarsigner
tool has an option for requesting a signed time stamp from a Time Stamping Authority (TSA). - Javac tool
- The
-parameters
option of thejavac
command can be used to store formal parameter names and enable the Reflection API to retrieve formal parameter names. - The type rules for equality operators in the Java Language Specification (JLS) Section 15.21 are now correctly enforced by the
javac
command. - The
javac
tool now has support for checking the content ofjavadoc
comments for issues that could lead to various problems, such as invalid HTML or accessibility issues, in the files that are generated whenjavadoc
is run. The feature is enabled by the new-Xdoclint
option. For more details, see the output from runningjavac -X
. This feature is also available in thejavadoc
tool, and is enabled there by default. - The
javac
tool now provides the ability to generate native headers, as needed. This removes the need to run thejavah
tool as a separate step in the build pipeline. The feature is enabled injavac
by using the new-h
option, which is used to specify a directory in which the header files should be written. Header files will be generated for any class which has either native methods, or constant fields annotated with a new annotation of typejava.lang.annotation.Native
.
- The
- Javadoc tool
- The
javadoc
tool supports the new DocTree API that enables you to traverse Javadoc comments as abstract syntax trees. - The
javadoc
tool supports the new Javadoc Access API that enables you to invoke the Javadoc tool directly from a Java application, without executing a new process. See thejavadoc
what's new page for more information. - The
javadoc
tool now has support for checking the content of javadoc comments for issues that could lead to various problems, such as invalid HTML or accessibility issues, in the files that are generated whenjavadoc
is run. The feature is enabled by default, and can also be controlled by the new-Xdoclint
option. For more details, see the output from runningjavadoc -X
. This feature is also available in thejavac
tool, although it is not enabled by default there.
- The
- The Rhino javascript engine has been replaced with the Nashorn Javascript Engine.
- Unicode Enhancements, including support for Unicode 6.2.0
- Adoption of Unicode CLDR Data and the java.locale.providers System Property
- New Calendar and Locale APIs
- Ability to Install a Custom Resource Bundle as an Extension
- For sandbox applets and Java Web Start applications, URLPermission is now used to allow connections back to the server from which they were started. SocketPermission is no longer granted.
- The Permissions attribute is required in the JAR file manifest of the main JAR file at all security levels.
- Pack200 Support for Constant Pool Entries and New Bytecodes Introduced by JSR 292
- JDK8 support for class files changes specified by JSR-292, JSR-308 and JSR-335
- The new Modena theme has been implemented in this release.
- The new
SwingNode
class enables developers to embed Swing content into JavaFX applications. - The new UI Controls include the
DatePicker
and theTreeTableView
controls. - The
javafx.print
package provides the public classes for the JavaFX Printing API. - The 3D Graphics features now include 3D shapes, camera, lights, subscene, material, picking, and antialiasing. The new
Shape3D
(Box
,Cylinder
,MeshView
, andSphere
subclasses),SubScene
,Material
,PickResult
,LightBase
(AmbientLight
andPointLight
subclasses), andSceneAntialiasing
API classes have been added to the JavaFX 3D Graphics library. TheCamera
API class has also been updated in this release. - The
WebView
class provides new features and improvements. Review Supported Features of HTML5 for more information about additional HTML5 features including Web Sockets, Web Workers, and Web Fonts. - Support for Hi-DPI displays has been added in this release.
- The CSS Styleable classes (
javafx.css javadoc
) became public API. - The new
ScheduledService
class allows to automatically restart the service. - JavaFX is now available for ARM platforms. JDK for ARM includes the base, graphics and controls components of JavaFX.