没有合适的资源?快使用搜索试试~ 我知道了~
JDK14-migration-guide.pdf
需积分: 5 0 下载量 77 浏览量
2023-08-08
07:26:51
上传
评论
收藏 316KB PDF 举报
温馨提示
试读
32页
JDK14-migration-guide
资源推荐
资源详情
资源评论
Java Platform, Standard Edition
Oracle JDK Migration Guide
Release 14
F23550-01
March 2020
Getting Started
The purpose of this guide is to help you identify potential issues and give you
suggestions on how to proceed as you migrate your existing Java application to JDK
14. The guide also highlights the significant changes and enhancements done in JDK
14.
This guide contains the following sections:
• Significant Changes in the JDK
• Preparing For Migration
• Migrating From JDK 8 to Later JDK Releases
• Next Steps
Note:
• Check the Oracle JDK Certified System Configurations for the latest
supported platforms and operating system versions.
• See Removed APIs, Tools, and Components before you start the
migration process.
• See Release Notes for detailed information about the new features and
changes in JDK 14.
Significant Changes in the JDK
Before migrating your application to the latest JDK release, you must understand what
the updates and changes are between it and the previous JDK release. If you are
migrating from JDK 8, you should also be familiar with the differences between JDK 8
and later releases that are described in Migrating From JDK 8 to Later JDK Releases.
See the following sections to learn about some of the significant changes in latest JDK
releases.
1
Significant Changes in JDK 14 Release
The following are some of the changes in Java SE 14 and JDK 14:
• Switch is extended so it can be used as either a statement or an expression, so
that both forms can use either traditional
case ... :
labels (with fall through) or
new
case ... ->
labels (with no fall through), with a further new statement for
yielding a value from a switch expression. See JEP 361: Switch Expressions
(Standard) and Java Language Changes.
• G1 is enhanced to improve allocation performance on non-uniform memory
access (NUMA) memory systems. See JEP 345: NUMA-Aware Memory Allocation
for G1.
• JDK Flight Recorder data is now available as a data stream allowing for
continuous monitoring. See JEP 349: JFR Event Streaming.
• New JDK-specific file mapping modes have been added so that the
FileChannel
API can be used to create
MappedByteBuffer
instances that refer to non-volatile
(NVM) memory. See JEP 352: Non-Volatile Mapped Byte Buffers.
• Allows currencies to be formatted with locale-specific accounting formats, for
example, ($3.27) instead of -$3.27. See Accounting Currency Format Support.
• Enhanced
com.sun.management.OperatingSystemMXBean
to ensure that it reports
values based on the current operating environment, such as a container
environment. The MXBean for tools to get information on the operating system has
been improved for container environments. See OperatingSystemMXBean made
container aware.
Experimental, Preview, and Incubator Features
•
Records
is a Java language preview feature, which provides a compact syntax for
declaring classes that are transparent holders for shallowly immutable data. See
JEP 359: Records (Preview).
• Pattern Matching for
instanceof
is a Java language preview feature that simplifies
the
instanceof-and-cast
idiom. See JEP 305: Pattern Matching for instanceof
(Preview).
• Text blocks are multi-line string literals that avoids the need for most escape
sequences, automatically formats the string in a predictable way, and gives the
developer control over the format when desired. Text Blocks were introduced in
JDK 13 as a Preview Feature. Text Blocks is being previewed again in JDK 14
with the addition of two new escape sequences. See JEP 368: Text Blocks
(Second Preview).
•
jpackage
, a simple tool for packaging self-contained Java applications. See JEP
343: Packaging Tool (Incubator).
• An API that allows Java programs to efficiently access foreign memory outside of
the Java heap is introduced. See JEP 370: Foreign-Memory Access API
(Incubator).
2
• The Z Garbage Collector (ZGC), previously available only for Linux, is introduced
as an experimental feature on Windows and macOS. See JEP 364: ZGC on
macOS and JEP 365: ZGC on Windows.
Removed APIs, Tools, and Components
See:
• APIs Removed in Java SE 14
• Features and Components Removed in JDK 14
In addition, there are security related updates that you need to be aware of. See:
Security Updates in JDK 14.
Significant Changes in JDK 13 Release
The following were some of the important enhancements in Java SE 13 and JDK 13:
• Dynamic CDS Archiving extends application class-data sharing (ApsCDS), which
allows dynamic archiving of classes when the Java application exits. See JEP 350:
Dynamic CDS Archives.
• Text blocks were added to Java language, which provide developers with control
over the format when desired. This is a preview language feature. See JEP 355
Text Blocks (Preview) and JEP 12: Preview Language and VM Features.
• The
switch
expression, a preview language feature, was extended to be used as
either a statement or an expression, so that both forms can use either traditional
labels (with fall through) or new labels (with no fall through). It is used with a
further new statement for yielding a value from a
switch
expression. See JEP 354:
Switch Expressions (Preview) and JEP 12: Preview Language and VM Features.
• The implementation used by
java.net.Socket
and
java.net.ServerSocket
APIs
was replaced with a simpler and more modern implementation that is easy to
maintain and debug. See JEP 353: Reimplement the Legacy Socket API.
• Support for Unicode 12.1. See Unicode 12.1.
• ZGC was enhanced to return unused heap memory to the operating system, which
enhances the memory footprint of the applications. See JEP 351 ZGC Uncommit
Unused Memory.
Significant Changes in JDK 12 Release
The following were some of the important additions and updates in Java SE 12 and
JDK 12:
• JVM Constants API was introduced to model nominal descriptions of key class-file
and run-time artifacts, in particular constants that were loadable from the constant
pool. See JVM Constant API.
• The
switch
statement was extended so that it can be used either as a statement
or an expression. This is a preview language feature. See JEP 325: Switch
Expressions (Preview) and JEP 12: Preview Language and VM Features.
3
• Support for Unicode 11.0. See Unicode 11.0.
• Square character support was provided for the Japanese Reiwa Era, which began
on May, 2019. See Square character support.
• The
NumberFormat
added support for formatting a number in its compact form. See
Compact Number Formatting Support .
Significant Changes in JDK 11 Release
JDK 11 had some significant changes too. As JDK 11 is a long term support (LTS)
release, you should be familiar with the following important changes in JDK 11
release:
• Oracle no longer offers JRE and Server JRE downloads; consequently, Auto-
Update is not available anymore.
• Java Web Start, Java Plugin, and Java Control Panel are not available in JDK.
See Removal of the Deployment Stack.
• JavaFX is no longer included in the JDK. It is now available as a separate
download from https://openjfx.io/.
• JAXB and JAX-WS are no longer bundled with JDK. See Removal of Java EE and
CORBA Modules.
Security Updates
This section provides details on the security updates in JDK releases.
Security Updates in JDK 14
The following are the noteable security updates in JDK 14:
• Exact Match Required for Trusted TLS Server Certificate
• New Checks on Trust Anchor Certificates
See Release Notes for additional information on security related changes.
Security Updates in JDK 13
The following were removed from JDK 13:
• Experimental FIPS 140 compliant mode from SunJSSE provider
• Duplicated RSA services no longer supported by SunJSSE provider
Removal of Security Certificates
The following root certificates were removed from the keystore in JDK 13:
• T-Systems Deutsche Telekom Root CA 2 certificate
• Two DocuSign Root CA certificates
4
• Two Comodo Root CA certificates
Security Updates in JDK 12 and JDK 11
The following security updates were made in JDK 12 and JDK 13:
The JDK 11 release included an implementation of the Transport Layer Security (TLS)
1.3 specification (RFC 8446).
TLS 1.3 is the latest iteration (August 2018) of the Transport Layer Security (TLS)
protocol and is enabled by default in JDK 11. This version focuses not only on speed
improvements, but also updates the overall security of the protocol by emphasizing
modern cryptography practices, and disallows outdated or weak crypto algorithms.
(For example, RSA key exchange and plain DSA signatures are no longer allowed.)
Several features were added to the TLS 1.3 protocol to improve backwards
compatibility, but there are several issues of which you need to be aware of. For
details, see JEP 332.
Removal of Security Certificates
The following root certificate was removed from the keystore in JDK 12:
• Removal of GTE CyberTrust Global Root
The following root certificates were removed from the truststore in JDK 11:
• Several Symantec Root CAs
• Baltimore Cybertrust Code Signing CA
• SECOM Root Certificate
• AOL and Swisscom root certificates
Products that use certificates that have been removed may no longer work. If these
certificates are required, then you must configure and populate the cacerts with the
missing certs. To add certs to the truststore, see keytool in Java Development Kit Tool
Specifications guide.
Removed APIs
This section provides details about Java SE APIs that were removed in JDK 14, JDK
13, JDK 12, and JDK 11 releases.
Run
jdeprscan --release 14 -l --for-removal
to get the list of APIs that are
marked for removal in JDK 14.
Note:
The jdeprscan tool is available since JDK 9. If you want to print the list of
APIs for a different JDK version, then replace the release number with 9 or
later.
5
剩余31页未读,继续阅读
资源评论
weixin_40191861_zj
- 粉丝: 63
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Screenshot_2024-05-21-17-06-42-64_2332cb9b27b851b548ba47a91682926c.jpg
- 毕业设计参考 - 基于树莓派、OpenCV及Python的人脸识别
- node-v18.20.2-linux-arm64
- 222222222222
- 16张相机标定图片,可复现本文畸变矫正
- dbeaver-ce-23.3.1-x86_64-setup.zip
- 基于X86 AVX2指令的快速卷积实现
- VMware-ESXi-7.0U3n-21930508-depot.zip文件
- MySQL 在 Windows 系统下的安装教程.zip
- Access文件数据库访问的客户端
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功