- 浏览: 70061 次
- 性别:
- 来自: 山西
-
文章分类
最新评论
jdk1.8 新特性
What's New in JDK 8
Java Platform, Standard Edition 8 is a major feature release. This document summarizes features and enhancements in Java SE 8 and in JDK 8, Oracle's implementation of Java SE 8. Click the component name for a more detailed description of the enhancements for that component.
-
-
Lambda Expressions, a new language feature, has been introduced in this release. They enable you to treat functionality as a method argument, or code as data. Lambda expressions let you express instances of single-method interfaces (referred to as functional interfaces) more compactly.
-
Method references provide easy-to-read lambda expressions for methods that already have a name.
-
Default methods enable new functionality to be added to the interfaces of libraries and ensure binary compatibility with code written for older versions of those interfaces.
-
Repeating Annotations provide the ability to apply the same annotation type more than once to the same declaration or type use.
-
Type Annotations provide the ability to apply an annotation anywhere a type is used, not just on a declaration. Used with a pluggable type system, this feature enables improved type checking of your code.
-
Improved type inference.
-
Method parameter reflection.
-
-
-
Classes in the new
java.util.stream
package provide a Stream API to support functional-style operations on streams of elements. The Stream API is integrated into the Collections API, which enables bulk operations on collections, such as sequential or parallel map-reduce transformations. -
Performance Improvement for HashMaps with Key Collisions
-
-
Compact Profilescontain predefined subsets of the Java SE platform and enable applications that do not require the entire Platform to be deployed and run on small devices.
-
-
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: The SunJCE provider is enhanced to support AES/GCM/NoPadding cipher implementation as well as GCM algorithm parameters. And the SunJSSE provider is enhanced to support AEAD mode based cipher suites. See Oracle Providers Documentation, JEP 115.
-
KeyStore enhancements, including the new Domain KeyStore type
java.security.DomainLoadStoreParameter
, and the new command option-importpassword
for the keytool utility -
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 new Modena theme has been implemented in this release. For more information, see the blog atfxexperience.com.
-
The new
SwingNode
class enables developers to embed Swing content into JavaFX applications. See theSwingNode
javadoc andEmbedding Swing Content in 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. See thejavadocfor more information. -
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. See the corresponding class javadoc forjavafx.scene.shape.Shape3D
,javafx.scene.SubScene
,javafx.scene.paint.Material
,javafx.scene.input.PickResult
,javafx.scene.SceneAntialiasing
, and theGetting Started with JavaFX 3D Graphicsdocument. -
The
WebView
class provides new features and improvements. ReviewSupported Features of HTML5for more information about additional HTML5 features including Web Sockets, Web Workers, and Web Fonts. -
Enhanced text support including bi-directional text and complex text scripts such as Thai and Hindi in controls, and multi-line, multi-style text in text nodes.
-
Support for Hi-DPI displays has been added in this release.
-
The CSS Styleable* classes became public API. See the
javafx.css
javadoc for more information. -
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.
-
-
-
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). -
-
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 running "javac -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 supports the newDocTree
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 newpage for more information. -
The
javadoc
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 default, and can also be controlled by the new-Xdoclint
option. For more details, see the output from running "javadoc -X
". This feature is also available in thejavac
tool, although it is not enabled by default there.
-
-
-
-
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.
-
-
Date-Time Package- a new set of packages that provide a comprehensive date-time model.
-
-
NashornJavascript Engine
-
-
-
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
-
-
-
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.
-
-
java.lang and java.util Packages
-
Parallel Array Sorting
-
Standard Encoding and Decoding Base64
-
Unsigned Arithmetic Support
-
-
-
The JDBC-ODBC Bridge has been removed.
-
JDBC 4.2 introduces new features.
-
-
Java DB
-
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.
-
-
-
Classes and interfaces have been added to the
java.util.concurrent
package. -
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.
-
-
-
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. 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.
-
-
Java Mission Control 5.3 Release Notes
-
JDK 8 includes Java Mission Control 5.3.
-
相关推荐
### JDK 1.8新特性详解:Lambda表达式与Java.util.function包 #### Lambda 表达式的引入 在探讨JDK 1.8的新特性时,我们不得不提到Lambda表达式。这一特性极大地简化了Java语言的语法结构,使得编写简洁、易读的...
JDK1.8引入了许多重要的新特性,极大地提升了Java编程的效率和性能。以下是这些特性的详细介绍: 1、**Lambda表达式**: Lambda表达式是JDK1.8的一个重大改进,它允许开发者以更简洁的方式传递代码块。在上述示例中...
JDK 1.8,也被称为Java SE 8,是Java平台的一个重要版本更新,其引入了多项新的特性和改进,极大地提升了Java编程的效率和表达能力。这些新特性包括函数式接口、接口的默认方法和静态方法、方法引用、Lambda表达式、...
视频教程地址:http://www.gulixueyuan.com/course/56
Java Development Kit (JDK) 1.8 是Java编程语言的一个重大版本,它引入了许多创新特性...通过查阅`oracle-jdk1.8中文API.CHM`,开发者可以找到详细的类、方法和接口描述,从而更好地在实际项目中应用这些强大的工具。
**JDK1.8 API 中文文档及新特性详解** JDK1.8,也称为Java Development Kit 8,是Java编程语言的一个重要版本,它引入了许多创新特性,旨在提高开发者的生产力和代码效率。这份PDF文档详细讲解了JDK1.8的API中文...
"jdk1.8新特性总结及使用示例" jdk1.8新特性总结及使用示例中介绍了Java 8中的Lambda表达式。Lambda表达式是一种匿名函数,可以将一段代码赋给一个变量。这种特性在Java 8中被引入,允许开发者将一块代码赋给一个...
### Java系列JDK 1.8 新特性之 Lambda表达式 #### 1、Lambda表达式介绍 Lambda表达式是Java 8中引入的一个重要新特性,它允许开发者以一种更加简洁的方式编写函数式接口实现代码。Lambda表达式本质上是一个匿名...
在本文中,我们将深入探讨JDK1.8的一些核心新特性。 1. **Lambda表达式**:这是JDK1.8最显著的改变之一。Lambda表达式使得函数式编程风格在Java中变得可能,简化了对集合的处理和事件监听器的编写。它允许开发者以...
JDK1.8新特性总结+java初学者
Jdk1.8新特性代码示例
jdk1.8新特性: 1.Java 8允许我们给接口添加一个非抽象的方法实现,只需要使用 default关键字即可。 2.新增lambda表达式 3.提供函数式接口 4.Java 8 允许你使用关键字来传递方法或者构造函数引用 5.我们可以直接在...
首先,JDK1.8最重要的新特性之一就是Lambda表达式。Lambda表达式是函数式编程的核心概念,它允许将函数作为一个值传递,简化了代码并提高了可读性。通过这种方式,开发者可以更方便地处理集合数据和编写多线程程序。...
总的来说,JDK 1.8中文版是Java开发者的重要参考资料,尤其是对那些希望快速了解和使用JDK 1.8新特性的开发者而言。尽管翻译可能存在瑕疵,但它仍然能够帮助我们理解和运用Java 1.8的核心功能,提升我们的开发效率。
提供两种资源方式:(JDK1.8压缩包64位Windows版本)上面JDK1.8压缩包直接下载(解压一下就可以用),想自己下载的下方官网网址自行查找 官网下载地址:https://www.oracle.com/java/technologies/downloads/ JDK...
1. **Lambda表达式**:这是JDK1.8最具代表性的新特性,它允许开发者以更简洁的方式处理匿名函数。Lambda表达式使得函数式编程风格在Java中变得更加自然,特别是在处理集合操作和事件监听时,如Stream API的使用。 2...
JDK1.8-331指的是Java开发工具包(Java Development Kit)的1.8版本的第331次更新。JDK是用于开发Java应用程序的基础工具集,提供了编译器(javac)、运行环境(Java Runtime Environment,JRE)和一些基本的类库。...
jdk1.8新特性 Java 8允许我们给接口添加一个非抽象的方法实现,只需要使用 default关键字即可。 新增lambda表达式 提供函数式接口 Java 8 允许你使用 :: 关键字来传递方法或者构造函数引用 我们可以直接在lambda...
1. **语言特性支持**:JDK 1.8引入了许多新特性,如Lambda表达式、方法引用来支持函数式编程,而Spring 3.2.0可能并未完全适配这些特性。这可能导致在编写代码或使用某些API时,遇到编译错误或运行时异常。 2. **...