JDK 15 is the open-source reference implementation of version 15 of the Java SE Platform, as specified by by JSR 390 in the Java Community Process. JDK 15 reached General Availability on 15 September 2020. Production-ready binaries under the GPL are available from Oracle; and others. The features and schedule of this release were proposed and tracked via the JEP Process, as amended by the JEP 2.0 proposal. The release was produced using the JDK Release Process (JEP 3).
2. Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
5. Rules for Java CPU’s
Main release for security vulnerabilities
Covers all JDK families (15, 14, 13, 12, 11, 8, 7, 6)
CPU release triggers Auto-update
Dates published 12 months in advance
Security Alerts are released as necessary
Based off the previous (non-CPU) release
Released simultaneously on java.com and OTN
JDK 15.0.1 - Security Baselines
JRE Family Version
JRE Security Baseline
(Full Version String)
14 14.0.2
13 13.0.2
12 12.0.2
11 11.0.9+7
10 10.0.2
9 9.0.4
8 1.8.0_271-b09
7 1.7.0_281-b06
6 1.6.0_221
JDK Version Numbers and JavaJDK Version Numbers and JavaJDK Version Numbers and JavaJDK Version Numbers and Java Critical Patch UpdatesCritical Patch UpdatesCritical Patch UpdatesCritical Patch Updates
$FEATURE -- formerly $MAJOR
$INTERIM -- formerly $MINOR
$UPDATE -- formerly $SECURITY
$EMERG -- The emergency-release counter, to produce an
emergency release to fix an urgent security issue.
$FEATURE.$INTERIM.$UPDATE.$EMERG
6. Difference between Oracle OpenJDK & Oracle JDK with Java SE 8 ..
and the change since Oracle JDK 11
• Java SE 8
• Security
• Performance
• Support
• Since Oracle JDK 11 it‘s technically interchangeable
• Security
• Performance
• Support only with Oracle JDK
7. JDK 6 Month Release Cadence
Option to use Oracle JDK or Oracle OpenJDK
9. Issues fixed in JDK 14 per organization
https://blogs.oracle.com/javahttps://blogs.oracle.com/javahttps://blogs.oracle.com/javahttps://blogs.oracle.com/java----platformplatformplatformplatform----group/thegroup/thegroup/thegroup/the----arrivalarrivalarrivalarrival----ofofofof----javajavajavajava----14141414
• JDK BUG System commitsJDK BUG System commitsJDK BUG System commitsJDK BUG System commits
• OverallOverallOverallOverall 1986198619861986 JIRA issues marked as fixed in JDKJIRA issues marked as fixed in JDKJIRA issues marked as fixed in JDKJIRA issues marked as fixed in JDK 14141414
• 1458145814581458 issues were completed by Oracleissues were completed by Oracleissues were completed by Oracleissues were completed by Oracle
• 528528528528 issues were contributed by individual developers and developers working for other organizationsissues were contributed by individual developers and developers working for other organizationsissues were contributed by individual developers and developers working for other organizationsissues were contributed by individual developers and developers working for other organizations
10. Issues fixed in JDK 15 per organization
https://https://https://https://blogs.oracle.com/javablogs.oracle.com/javablogs.oracle.com/javablogs.oracle.com/java----platformplatformplatformplatform----group/thegroup/thegroup/thegroup/the----arrivalarrivalarrivalarrival----ofofofof----javajavajavajava----15151515
• JDK BUG System commitsJDK BUG System commitsJDK BUG System commitsJDK BUG System commits
• OverallOverallOverallOverall 2136213621362136 JIRA issues marked as fixed in JDKJIRA issues marked as fixed in JDKJIRA issues marked as fixed in JDKJIRA issues marked as fixed in JDK 15151515
• 1702170217021702 issues were completed by Oracleissues were completed by Oracleissues were completed by Oracleissues were completed by Oracle
• 434434434434 issues were contributed by individual developers and developers working for other organizationsissues were contributed by individual developers and developers working for other organizationsissues were contributed by individual developers and developers working for other organizationsissues were contributed by individual developers and developers working for other organizations
12. OpenJDK Project
• Open source implementation of Java SE
• Licensed under GPLv2 with classpath exception
• Reference implementation for Java SE 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ..
• Different vendors/implementers working in common space
– Oracle, IBM, Intel, Twitter, Azul, Google, RedHat, SAP
• Many Java SE related projects
13. Oracle Contributor Agreement - OCTLA Signatories List
• The following organizations and individuals have signed the OpenJDK Community
TCK License Agreement (OCTLA) and been granted access to the JCK
– Signatories for Java SE 9, or later
• Amazon.com Services, Inc.
• Ampere Computing LLC
• Azul Systems, Inc.
• BellSoft
• Canonical
• Fujitsu Technology Solutions GmbH
• J-Class Solutions, Inc.
• London Jamocha Community
• Loongson Technology Co., Ltd.
• Marvell Semiconductor Inc.
• MicroDoc Software GmbH
• Red Hat
• Sage Embedded Software LLC
• SAP
• SUSE Linux GmbH
• Twitter
• Waratek Limited
http://openjdk.java.net/groups/conformance/JckAccess/jck-access.html
14. OpenJDK and Java Ownership
• Java is a registered trademark of Oracle
– OpenJDK is named idependently
– Access to the Technology Compatibility Kit (TCK) is restricted
• TCK access requires to sign the OpenJDK Community TCK License Agreement (OCTLA)
– OpenJDK or substantially projects only
– OCTLA did not allow to disclose TCK information to Non-OCTLA licensees
• OCTLA is not a trademark license
• OpenJDK could be used according to the OpenJDK Trademark Notice
– http://openjdk.java.net/legal/openjdk-trademark-notice.html
15. OpenJDK Infrastructure
• OpenJDK homepage
• Mercurial repositories
– Forests of nested sub-repositories
• Mailing lists
• JDK Bug System
– https://bugs.openjdk.java.net
• Code review server cr.openjdk.java.net
– Review requests in Webrev format
– Access only for Author or higher roles
• OpenJDK Wiki for group member only to get write access
16. OpenJDK Bug Reporting
• Bug should be reproduced with the latest builds
• Debug build is appropriate
• Simple test case desirable (Jtreg test, ..)
• JDK Bug System search for similar bugs
– Public visible bugs
– Invisible bugs like security bugs and customer bugs
• Non-Authors bug submit only with Java Bug Database and temp bug ID
– https://bugs.java.com/
• Use to write directly to the mailing list for simple reproducible bugs
17. OpenJDK Tools - Mercurial
• Mercurial is a distributed source control system implemented in Python
• OpenJDK uses nested sub-repositories, i.e. forest:
– to clone them manually, like corba, hotspot, jaxp, jaxws, jdk, langtools, nashorn
$ hg clone http://hg.openjdk.java.net/jdk9/dev jdk9-dev
$ cd jdk9-dev
$ hg clone http://hg.openjdk.java.net/jdk9/dev/hotspot
$ hg clone http://hg.openjdk.java.net/jdk9/dev/nashorn
– or use the get_source.sh script which does the same in parallel
$ hg clone http://hg.openjdk.java.net/jdk9/dev jdk9-dev
$ cd jdk9-dev
$ sh get_source.sh
• Use common/bin/hgforest.sh to execute hg commands in all repositories
18. • Oracle's OpenJDK JDK binaries for Windows, macOS, and Linux are available
on release-specific pages of jdk.java.net as .tar.gz or .zip archives.
• As an example, the archives for JDK 15 may be found on jdk.java.net/15
and may be extracted on the command line using
– $ tar xvf openjdk-15*_bin.tar.gz
or
– $ unzip openjdk-15*_bin.zip
depending on the archive type.
Download and install prebuilt OpenJDK 15 packages
https://openjdk.java.net/install/
19. • This page provides production-ready open-source builds of the Java Development Kit, version 15, an implementation of
the Java SE 15 Platform under the GNU General Public License, version 2, with the Classpath Exception.
• Commercial builds of JDK 15 from Oracle, under a non-open-source license, can be found at the Oracle Technology
Network.
• Documentation
– Features
– Release notes
– API Javadoc
– Tool & command reference
• Builds
– Linux / AArch64 tar.gz (sha256) 170467678
– Linux / x64 tar.gz (sha256) 195313679
– macOS / x64 tar.gz (sha256) 192743279
– Windows / x64 zip (sha256) 195901213
JDK 15 General-Availability Release
https://jdk.java.net/15/
JDK 16 Early-Access Builds
https://jdk.java.net/16/
22. JDK 14 – Features – JEP’s
• 305:305:305:305: Pattern Matching forPattern Matching forPattern Matching forPattern Matching for instanceofinstanceofinstanceofinstanceof (Preview)(Preview)(Preview)(Preview)
• 343343343343:::: Packaging Tool (Incubator)Packaging Tool (Incubator)Packaging Tool (Incubator)Packaging Tool (Incubator)
• 345:345:345:345: NUMANUMANUMANUMA----Aware Memory Allocation for G1Aware Memory Allocation for G1Aware Memory Allocation for G1Aware Memory Allocation for G1
• 349:349:349:349: JFR Event StreamingJFR Event StreamingJFR Event StreamingJFR Event Streaming
• 352:352:352:352: NonNonNonNon----Volatile Mapped Byte BuffersVolatile Mapped Byte BuffersVolatile Mapped Byte BuffersVolatile Mapped Byte Buffers
• 358:358:358:358: HelpfulHelpfulHelpfulHelpful NullPointerExceptionsNullPointerExceptionsNullPointerExceptionsNullPointerExceptions
• 359:359:359:359: Records (Preview)Records (Preview)Records (Preview)Records (Preview)
• 361:361:361:361: Switch Expressions (Standard)Switch Expressions (Standard)Switch Expressions (Standard)Switch Expressions (Standard)
• 362:362:362:362: Deprecate the Solaris and SPARC PortsDeprecate the Solaris and SPARC PortsDeprecate the Solaris and SPARC PortsDeprecate the Solaris and SPARC Ports
• 363:363:363:363: Remove the Concurrent Mark Sweep (CMS) Garbage CollectorRemove the Concurrent Mark Sweep (CMS) Garbage CollectorRemove the Concurrent Mark Sweep (CMS) Garbage CollectorRemove the Concurrent Mark Sweep (CMS) Garbage Collector
• 364:364:364:364: ZGC onZGC onZGC onZGC on macOSmacOSmacOSmacOS
• 365:365:365:365: ZGC on WindowsZGC on WindowsZGC on WindowsZGC on Windows
• 366:366:366:366: Deprecate theDeprecate theDeprecate theDeprecate the ParallelScavengeParallelScavengeParallelScavengeParallelScavenge ++++ SerialOldSerialOldSerialOldSerialOld GC CombinationGC CombinationGC CombinationGC Combination
• 367:367:367:367: Remove the Pack200 Tools and APIRemove the Pack200 Tools and APIRemove the Pack200 Tools and APIRemove the Pack200 Tools and API
• 368:368:368:368: Text Blocks (Second Preview)Text Blocks (Second Preview)Text Blocks (Second Preview)Text Blocks (Second Preview)
• 370:370:370:370: ForeignForeignForeignForeign----Memory Access API (Incubator)Memory Access API (Incubator)Memory Access API (Incubator)Memory Access API (Incubator)
https://openjdk.java.net/projects/jdk/14/
23. JEP 359: Records (Preview)
• RecordsRecordsRecordsRecords provide a compact syntax for declaring classesprovide a compact syntax for declaring classesprovide a compact syntax for declaring classesprovide a compact syntax for declaring classes that are nothing more, orthat are nothing more, orthat are nothing more, orthat are nothing more, or
mostly, plain carriers that serves as simple aggregatesmostly, plain carriers that serves as simple aggregatesmostly, plain carriers that serves as simple aggregatesmostly, plain carriers that serves as simple aggregates
• Example:Example:Example:Example: record Point(int x, int y) { }
• Records acquire many standard members automaticalyRecords acquire many standard members automaticalyRecords acquire many standard members automaticalyRecords acquire many standard members automaticaly
• A private final field for each componentA private final field for each componentA private final field for each componentA private final field for each component
• A public read accessor for each componentA public read accessor for each componentA public read accessor for each componentA public read accessor for each component
• A public constructorA public constructorA public constructorA public constructor
• Implementations or equals, hashCode and toStringImplementations or equals, hashCode and toStringImplementations or equals, hashCode and toStringImplementations or equals, hashCode and toString
• Replacement of data class with „records“Replacement of data class with „records“Replacement of data class with „records“Replacement of data class with „records“
• Records as a “simpleRecords as a “simpleRecords as a “simpleRecords as a “simple datadatadatadata encapsulation”encapsulation”encapsulation”encapsulation”
• “Records“Records“Records“Records are serialized differently than ordinary serializable orare serialized differently than ordinary serializable orare serialized differently than ordinary serializable orare serialized differently than ordinary serializable or externalizableexternalizableexternalizableexternalizable objects.objects.objects.objects.
The serialized form of a record object is a sequence of values derived from theThe serialized form of a record object is a sequence of values derived from theThe serialized form of a record object is a sequence of values derived from theThe serialized form of a record object is a sequence of values derived from the
recordrecordrecordrecord componentscomponentscomponentscomponents.”.”.”.”httpshttpshttpshttps://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/io/ObjectInputStream.html#record://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/io/ObjectInputStream.html#record://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/io/ObjectInputStream.html#record://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/io/ObjectInputStream.html#record----serializationserializationserializationserialization
https://openjdk.java.net/jeps/359
40. JDK 15 (JSR 390) Features - JEP’s
• 339:339:339:339: EdwardsEdwardsEdwardsEdwards----Curve Digital Signature Algorithm (Curve Digital Signature Algorithm (Curve Digital Signature Algorithm (Curve Digital Signature Algorithm (EdDSAEdDSAEdDSAEdDSA)))) [New][New][New][New]
• 360360360360:::: Sealed Classes (PreviewSealed Classes (PreviewSealed Classes (PreviewSealed Classes (Preview)))) [Looking Forward][Looking Forward][Looking Forward][Looking Forward]
• 371371371371:::: Hidden ClassesHidden ClassesHidden ClassesHidden Classes [New[New[New[New]]]]
• 372372372372:::: Remove theRemove theRemove theRemove the NashornNashornNashornNashorn JavaScript EngineJavaScript EngineJavaScript EngineJavaScript Engine [[[[DeprecationsDeprecationsDeprecationsDeprecations &&&& Removals]Removals]Removals]Removals]
• 373373373373:::: ReimplementReimplementReimplementReimplement the Legacythe Legacythe Legacythe Legacy DatagramSocketDatagramSocketDatagramSocketDatagramSocket APIAPIAPIAPI [Modernizing][Modernizing][Modernizing][Modernizing]
• 374374374374:::: Disable and Deprecate Biased LockingDisable and Deprecate Biased LockingDisable and Deprecate Biased LockingDisable and Deprecate Biased Locking [[[[DeprecationsDeprecationsDeprecationsDeprecations &&&& Removals]Removals]Removals]Removals]
• 375375375375:::: Pattern Matching forPattern Matching forPattern Matching forPattern Matching for instanceofinstanceofinstanceofinstanceof (Second Preview)(Second Preview)(Second Preview)(Second Preview) [[[[Looking Forward]Looking Forward]Looking Forward]Looking Forward]
• 377377377377:::: ZGC: A Scalable LowZGC: A Scalable LowZGC: A Scalable LowZGC: A Scalable Low----Latency Garbage CollectorLatency Garbage CollectorLatency Garbage CollectorLatency Garbage Collector [Added to the Standard[Added to the Standard[Added to the Standard[Added to the Standard]]]]
• 378378378378:::: TextTextTextText BlocksBlocksBlocksBlocks [Added to the Standard[Added to the Standard[Added to the Standard[Added to the Standard]]]]
• 379379379379:::: Shenandoah: A LowShenandoah: A LowShenandoah: A LowShenandoah: A Low----PausePausePausePause----Time Garbage CollectorTime Garbage CollectorTime Garbage CollectorTime Garbage Collector [[[[Added to theAdded to theAdded to theAdded to the StandardStandardStandardStandard]]]]
• 381381381381:::: Remove the Solaris and SPARCRemove the Solaris and SPARCRemove the Solaris and SPARCRemove the Solaris and SPARC PortsPortsPortsPorts [Deprecations & Removals][Deprecations & Removals][Deprecations & Removals][Deprecations & Removals]
• 383383383383:::: ForeignForeignForeignForeign----Memory Access API (Second Incubator)Memory Access API (Second Incubator)Memory Access API (Second Incubator)Memory Access API (Second Incubator) [[[[Looking Forward]Looking Forward]Looking Forward]Looking Forward]
• 384384384384:::: Records (Second Preview)Records (Second Preview)Records (Second Preview)Records (Second Preview) [[[[Looking Forward]Looking Forward]Looking Forward]Looking Forward]
• 385385385385:::: Deprecate RMI Activation for RemovalDeprecate RMI Activation for RemovalDeprecate RMI Activation for RemovalDeprecate RMI Activation for Removal [[[[DeprecationsDeprecationsDeprecationsDeprecations &&&& Removals]Removals]Removals]Removals]
41. JEP 339: Edwards-Curve Digital Signature
Algorithm (EdDSA)
• EdDSA is a modern elliptic curve signature scheme that has several
advantages over the existing signature schemes in the JDK. The primary
goal of this JEP is an implementation of this scheme as standardized in
RFC 8032. This new signature scheme does not replace ECDSA.
• Platform-independent implementation of EdDSA with better
performance than the existing ECDSA implementation (which uses
native C code) at the same security strength
• Aims to prevent side-channel attacks
• Timing is independent of secrets
• Will not branch on secrets
42. JEP 371: Hidden Classes
• Hidden classes that cannot be used directly by the bytecode of
other classes
• Hidden classes are intended for use by frameworks that generate
classes at run time and use them indirectly, via reflection
• A hidden class may be defined as a member of an access control
nest, and may be unloaded independently of other classes
• Allows to deprecate the nonnonnonnon----standard APIstandard APIstandard APIstandard API
sun.misc.Unsafe::defineAnonymousClass, with the
intent to deprecate it for removal in a future release
43. JEP 378: Text Blocks
Previewed in JDK 13 and JDK 14
• A text block is a multi-line string literal 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.
• To allow finer control of the processing of newlines and white
spaces, this second preview introduces two new escape
sequences
This JEP represents content from Project Amber, implementing small
language changes to the Java platform.
44. JEP 377: Z Garbage Collector
Experimental no more
• Change the Z Garbage Collector from experimental feature into a
product feature
• ZGC, is a concurrent, NUMA-aware, scalable low-latency garbage
collector, geared to delivery < 10ms GC pauses even on multi-
terabytes heaps
• The ZGC pause times (ms) are significant lower than parallel or G1
• -XX:+UnlockExperimentalVMOptions option no longer needed
• The default GC remains G1
45. JEP 379: Shenandoah GC
No longer experimental
• Change the Shenandoah Garbage Collector from experimental
feature into a product feature
• -XX:+UnlockExperimentalVMOptions option no longer needed
• The default GC remains G1
46. JEP 373: Reimplement the Legacy
DatagramSocket API
• Replace the underlying implementations of the java.net.DatagramSocket
and java.net.MulticastSocket APIs with simpler and more modern
implementations that are easy to maintain and debug.
• The new implementations will be easy to adapt to work with virtual
threads, currently being explored in Project Loom. This is a follow-on to
JEP 353, which already reimplemented the legacy Socket API.
• To reduce the risk of switching the implementation after more than
twenty years, the legacy implementation will not be removed. A JDK-
specific system property, jdk.net.usePlainDatagramSocketImpl, is
introduced to configure the JDK to use the legacy implementation
47. JEP 360: Sealed Classes (Preview) (1)
• Sealed classes and interfaces restrict which other classes or interfaces
may extend or implement them.
• Allow the author of a class or interface to control which code is reponsible for
implementating it.
• Provide a more declarative way than access modifiers to restrict the use of a
superclass.
• Support future directions in pattern matching by underpinning the exhaustive
analysis of patterns.
This is from Project Amber
Preview features are fully specified, fully implemented, and yet impermanent. Available in a
JDK feature release to provoke developer feedback. May lead to it becoming permanent in
a future Java SE Platform. Requires a flag to enable at compile and at runtime.
48. JEP 360: Sealed Classes (Preview) (2)
Constraints
• The sealed class and its permitted subclasses must belong to the same
module, and, if declared in an unnamed module, the same package.
• Every permitted subclass must directly extend the sealed class.
• Every permitted subclass must choose a modifier to describe how it
continues the sealing initiated by its superclass; final, sealed, or non-
sealed (a sealed class cannot prevent its permitted subclasses from
doing this.)
This is from Project Amber
Preview features are fully specified, fully implemented, and yet impermanent. Available in a
JDK feature release to provoke developer feedback. May lead to it becoming permanent in
a future Java SE Platform. Requires a flag to enable at compile and at runtime.
49. JEP 375: Pattern Matching for instanceof
Second Preview
• Enhance the Java programming language with pattern matching for the
instanceof operator.
• Pattern matching allows common logic in a program, namely the
conditional extraction of components from objects, to be expressed
more concisely and safely.
• This is a preview language feature in JDK 15.
This is from Project Amber
Preview features are fully specified, fully implemented, and yet impermanent. Available in a
JDK feature release to provoke developer feedback. May lead to it becoming permanent in
a future Java SE Platform. Requires a flag to enable at compile and at runtime.
50. JEP 384: Records
Second Preview
• Records provide a compact syntax for declaring classes which are
transparent holders for shallowly (flat) immutable data
This is from Project Amber
Preview features are fully specified, fully implemented, and yet impermanent. Available in a
JDK feature release to provoke developer feedback. May lead to it becoming permanent in
a future Java SE Platform. Requires a flag to enable at compile and at runtime.
51. JEP 384: Records
Local Records – Added in the Second Preview
• In the example, the aggregation of a merchant and a monthly sales
figure is modeled with a local record, MerchantSales. Using this
record improves the readability of the stream operations which follow:
List<Merchant> findTopMerchants(List<Merchant> merchants, int month) {
// Local record
record MerchantSales(Merchant merchant, double sales) {}
return merchants.stream()
.map(merchant -> new MerchantSales(merchant, computeSales(merchant, month)))
.sorted((m1, m2) -> Double.compare(m2.sales(), m1.sales()))
.map(MerchantSales::merchant)
.collect(toList());
}
52. JEP 383: Foreign-Memory Access API
Second Incubator
• API to allow Java programs to safely and efficiently access foreign
memory outside of the Java heap.
• Aimes to provide a valid alternative to the main avenues by which Java
programs access foreign memory today, namely
java.nio.ByteBuffer and sun.misc.Unsafe.
First major content from Project Panama, a project with the goal of
improving connections between Java and non-Java API‘s
Incubator modules are a means of putting non-final API‘s and non-final tools in the hands of developers,
while the API‘s/tools progress towards either finalization or removal in a future release.
54. Removals
• Nashorn Java Script Engine (JEP 372)
‒ Deprecated for removal since JDK 11
• Solaris and SPARC ports (JEP 381)
‒ Deprecated for removal with JDK 14
• The source code for these features remains availble in OpenJDK
56. Java SE Support Roadmap*
http://www.oracle.com/technetwork/java/eolhttp://www.oracle.com/technetwork/java/eolhttp://www.oracle.com/technetwork/java/eolhttp://www.oracle.com/technetwork/java/eol----135779.html135779.html135779.html135779.html
57. Java SE Support Roadmap*
Web Deployment Technology and JavaFX
59. Migrating to Oracle JDK 15 - Migration Guide (1)
https://https://https://https://docs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.html
The JDK 15 migration guideThe JDK 15 migration guideThe JDK 15 migration guideThe JDK 15 migration guide contains the following sections:contains the following sections:contains the following sections:contains the following sections:
• Significant Changes in the JDKSignificant Changes in the JDKSignificant Changes in the JDKSignificant Changes in the JDK
• Preparing For MigrationPreparing For MigrationPreparing For MigrationPreparing For Migration
• Migrating From JDK 8 to Later JDK ReleasesMigrating From JDK 8 to Later JDK ReleasesMigrating From JDK 8 to Later JDK ReleasesMigrating From JDK 8 to Later JDK Releases
• Next StepsNext StepsNext StepsNext Steps
60. Migrating to Oracle JDK 15 - Migration Guide (2)
https://https://https://https://docs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.html
Prepare for MigrationPrepare for MigrationPrepare for MigrationPrepare for Migration
• Download JDK 15
• Run Your Program Before Recompiling
• Update Third-Party Libraries
• Compile Your Application if Needed
• Run jdeps on Your Code
61. Oracle JDK 15 – Significant Changes in the JDK
https://https://https://https://docs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.html
• SeeSeeSeeSee JDK 15 Release Notes for the complete list of new features and enhancements inJDK 15 Release Notes for the complete list of new features and enhancements inJDK 15 Release Notes for the complete list of new features and enhancements inJDK 15 Release Notes for the complete list of new features and enhancements in
JDK 15JDK 15JDK 15JDK 15....
• TheTheTheThe following are some of the updates in Java SE 15 and JDK 15:following are some of the updates in Java SE 15 and JDK 15:following are some of the updates in Java SE 15 and JDK 15:following are some of the updates in Java SE 15 and JDK 15:
• TextTextTextText Blocks, first previewed in Java SE 13, is a permanent feature in this release and can be usedBlocks, first previewed in Java SE 13, is a permanent feature in this release and can be usedBlocks, first previewed in Java SE 13, is a permanent feature in this release and can be usedBlocks, first previewed in Java SE 13, is a permanent feature in this release and can be used
without enabling preview features.without enabling preview features.without enabling preview features.without enabling preview features.
• TextTextTextText blocks are multiline string literals that avoid the need for most escape sequences, automaticallyblocks are multiline string literals that avoid the need for most escape sequences, automaticallyblocks are multiline string literals that avoid the need for most escape sequences, automaticallyblocks are multiline string literals that avoid the need for most escape sequences, automatically
format the string in a predictable way, and give the developer control over the format when desired.format the string in a predictable way, and give the developer control over the format when desired.format the string in a predictable way, and give the developer control over the format when desired.format the string in a predictable way, and give the developer control over the format when desired.
See JEP 378: Text Blocks and Programmer's Guide to Text Blocks.See JEP 378: Text Blocks and Programmer's Guide to Text Blocks.See JEP 378: Text Blocks and Programmer's Guide to Text Blocks.See JEP 378: Text Blocks and Programmer's Guide to Text Blocks.
• TheTheTheThe Z Garbage Collector (ZGC) is ready to use in production and no longer an experimental feature.Z Garbage Collector (ZGC) is ready to use in production and no longer an experimental feature.Z Garbage Collector (ZGC) is ready to use in production and no longer an experimental feature.Z Garbage Collector (ZGC) is ready to use in production and no longer an experimental feature.
Enable ZGC by using the commandEnable ZGC by using the commandEnable ZGC by using the commandEnable ZGC by using the command----line optionline optionline optionline option ----XX:+XX:+XX:+XX:+UseZGCUseZGCUseZGCUseZGC. See JEP 377: ZGC: A Scalable Low. See JEP 377: ZGC: A Scalable Low. See JEP 377: ZGC: A Scalable Low. See JEP 377: ZGC: A Scalable Low----
Latency Garbage Collector (Production).Latency Garbage Collector (Production).Latency Garbage Collector (Production).Latency Garbage Collector (Production).
• HiddenHiddenHiddenHidden classes are classes that cannot be used directly by the bytecode of other classes. Hiddenclasses are classes that cannot be used directly by the bytecode of other classes. Hiddenclasses are classes that cannot be used directly by the bytecode of other classes. Hiddenclasses are classes that cannot be used directly by the bytecode of other classes. Hidden
classes are intended for use by frameworks that generate classes at run time and use themclasses are intended for use by frameworks that generate classes at run time and use themclasses are intended for use by frameworks that generate classes at run time and use themclasses are intended for use by frameworks that generate classes at run time and use them
indirectly through reflection. See JEP 371: Hidden Classes.indirectly through reflection. See JEP 371: Hidden Classes.indirectly through reflection. See JEP 371: Hidden Classes.indirectly through reflection. See JEP 371: Hidden Classes.
62. Oracle JDK 15 – Preview and Incubator Features
https://https://https://https://docs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.htmldocs.oracle.com/en/java/javase/15/migrate/index.html
• SealedSealedSealedSealed ClassesClassesClassesClasses is a Java language preview feature. Sealed classes and interfaces restrict which otheris a Java language preview feature. Sealed classes and interfaces restrict which otheris a Java language preview feature. Sealed classes and interfaces restrict which otheris a Java language preview feature. Sealed classes and interfaces restrict which other
classes or interfaces may extend or implement them. See JEP 360: Sealed Classes (Preview) and Sealedclasses or interfaces may extend or implement them. See JEP 360: Sealed Classes (Preview) and Sealedclasses or interfaces may extend or implement them. See JEP 360: Sealed Classes (Preview) and Sealedclasses or interfaces may extend or implement them. See JEP 360: Sealed Classes (Preview) and Sealed
Classes in Java Platform, Standard Edition Java Language Updates guide.Classes in Java Platform, Standard Edition Java Language Updates guide.Classes in Java Platform, Standard Edition Java Language Updates guide.Classes in Java Platform, Standard Edition Java Language Updates guide.
• PatternPatternPatternPattern Matching forMatching forMatching forMatching for instanceofinstanceofinstanceofinstanceof, a preview feature from Java SE 14, is re, a preview feature from Java SE 14, is re, a preview feature from Java SE 14, is re, a preview feature from Java SE 14, is re----previewed for this release.previewed for this release.previewed for this release.previewed for this release.
This feature allows common logic in a program, namely the conditional extraction of components fromThis feature allows common logic in a program, namely the conditional extraction of components fromThis feature allows common logic in a program, namely the conditional extraction of components fromThis feature allows common logic in a program, namely the conditional extraction of components from
objects, to be expressed more concisely and safely. See JEP 375: Pattern Matching forobjects, to be expressed more concisely and safely. See JEP 375: Pattern Matching forobjects, to be expressed more concisely and safely. See JEP 375: Pattern Matching forobjects, to be expressed more concisely and safely. See JEP 375: Pattern Matching for instanceofinstanceofinstanceofinstanceof
(Second Preview) and Pattern Matching for the(Second Preview) and Pattern Matching for the(Second Preview) and Pattern Matching for the(Second Preview) and Pattern Matching for the instanceofinstanceofinstanceofinstanceof in Java Platform, Standard Edition Javain Java Platform, Standard Edition Javain Java Platform, Standard Edition Javain Java Platform, Standard Edition Java
Language Updates guide.Language Updates guide.Language Updates guide.Language Updates guide.
• RecordsRecordsRecordsRecords, a preview feature from Java SE 14, is re, a preview feature from Java SE 14, is re, a preview feature from Java SE 14, is re, a preview feature from Java SE 14, is re----previewed for this release. Records are classes that actpreviewed for this release. Records are classes that actpreviewed for this release. Records are classes that actpreviewed for this release. Records are classes that act
as transparent carriers for immutable data. See JEP 384: Records (Second Preview) and Record Classesas transparent carriers for immutable data. See JEP 384: Records (Second Preview) and Record Classesas transparent carriers for immutable data. See JEP 384: Records (Second Preview) and Record Classesas transparent carriers for immutable data. See JEP 384: Records (Second Preview) and Record Classes
in Java Platform, Standard Edition Java Language Updates guide.in Java Platform, Standard Edition Java Language Updates guide.in Java Platform, Standard Edition Java Language Updates guide.in Java Platform, Standard Edition Java Language Updates guide.
• TheTheTheThe Foreign Memory Access APIForeign Memory Access APIForeign Memory Access APIForeign Memory Access API allows Java programs to efficiently and safely access foreign memoryallows Java programs to efficiently and safely access foreign memoryallows Java programs to efficiently and safely access foreign memoryallows Java programs to efficiently and safely access foreign memory
outside of the Java heap. See JEP 383: Foreignoutside of the Java heap. See JEP 383: Foreignoutside of the Java heap. See JEP 383: Foreignoutside of the Java heap. See JEP 383: Foreign----Memory Access API (Second Incubator).Memory Access API (Second Incubator).Memory Access API (Second Incubator).Memory Access API (Second Incubator).
64. Run smaller images – Remove parts
of Java you don’t use
JavaJavaJavaJava SESESESE 15151515 with jlinkwith jlinkwith jlinkwith jlink vsvsvsvs.... JavaJavaJavaJava SESESESE 15151515 with JREwith JREwith JREwith JRE
65. NewNewNewNew Project:Project:Project:Project: Leyden (1)Leyden (1)Leyden (1)Leyden (1)
• New Project, Leyden, whose primary goal will be to address the long-term pain
points of Java’s slow startup time, slow time to peak performance, and large
footprint.
• Leyden will address these pain points by introducing a concept of _static images_
to the Java Platform, and to the JDK.
– A static image is a standalone program, derived from an application, which runs
that application -- and no other.
– A static image is a closed world: It cannot load classes from outside the image,
nor can it spin new bytecodes at run time.
66. NewNewNewNew Project:Project:Project:Project: Leyden (2)Leyden (2)Leyden (2)Leyden (2)
• Project Leyden will take inspiration from past efforts to explore this space,
including the GNU Compiler for Java and the Native Image feature of GraalVM.
Leyden will add static images to the Java Platform Specification, and we expect
that GraalVM will evolve to implement that specification. Developers who use only
the standard, specified static-image feature will then be able to switch with ease
between Leyden (in the JDK), Native Image (in GraalVM), and whatever other
conforming implementations may arise, choosing amongst tradeoffs of compile
time, startup time, and image size.
• We do not intend to implement Leyden by merging the Native Image code from
GraalVM into the JDK. Leyden will, rather, be based upon existing components in
the JDK such as the HotSpot JVM, the `jaotc` ahead-of-time compiler, application
class-data sharing, and the `jlink` linking tool.
68. JDK 16 (JSR 391) Features – JEP’s
JEPs proposed to target JDK 16JEPs proposed to target JDK 16JEPs proposed to target JDK 16JEPs proposed to target JDK 16
• 380:380:380:380: UnixUnixUnixUnix----Domain Socket ChannelsDomain Socket ChannelsDomain Socket ChannelsDomain Socket Channels review ends 2020/10/27review ends 2020/10/27review ends 2020/10/27review ends 2020/10/27
• 392:392:392:392: PackagingPackagingPackagingPackaging ToolToolToolTool review ends 2020/10/30review ends 2020/10/30review ends 2020/10/30review ends 2020/10/30
• 393:393:393:393: ForeignForeignForeignForeign----Memory Access API (ThirdMemory Access API (ThirdMemory Access API (ThirdMemory Access API (Third Incubator)Incubator)Incubator)Incubator) review ends 2020/11/02review ends 2020/11/02review ends 2020/11/02review ends 2020/11/02
• 395:395:395:395: RecordsRecordsRecordsRecords review ends 2020/10/27review ends 2020/10/27review ends 2020/10/27review ends 2020/10/27
JEPsJEPsJEPsJEPs targeted to JDK 16, so fartargeted to JDK 16, so fartargeted to JDK 16, so fartargeted to JDK 16, so far
• 338:338:338:338: Vector API (Incubator)Vector API (Incubator)Vector API (Incubator)Vector API (Incubator)
• 347:347:347:347: Enable C++14 Language FeaturesEnable C++14 Language FeaturesEnable C++14 Language FeaturesEnable C++14 Language Features
• 357:357:357:357: Migrate from Mercurial toMigrate from Mercurial toMigrate from Mercurial toMigrate from Mercurial to GitGitGitGit
• 369:369:369:369: Migrate to GitHubMigrate to GitHubMigrate to GitHubMigrate to GitHub
• 376:376:376:376: ZGC: Concurrent ThreadZGC: Concurrent ThreadZGC: Concurrent ThreadZGC: Concurrent Thread----Stack ProcessingStack ProcessingStack ProcessingStack Processing
• 386:386:386:386: Alpine Linux PortAlpine Linux PortAlpine Linux PortAlpine Linux Port
• 387:387:387:387: ElasticElasticElasticElastic MetaspaceMetaspaceMetaspaceMetaspace
• 388:388:388:388: Windows/AArch64 PortWindows/AArch64 PortWindows/AArch64 PortWindows/AArch64 Port
69. Project Skara (1)
• JEP 357: Migrate from Mercurial toJEP 357: Migrate from Mercurial toJEP 357: Migrate from Mercurial toJEP 357: Migrate from Mercurial to GitGitGitGit
• Migrate theMigrate theMigrate theMigrate the OpenJDKOpenJDKOpenJDKOpenJDK Community's source code repositories from Mercurial (hg) toCommunity's source code repositories from Mercurial (hg) toCommunity's source code repositories from Mercurial (hg) toCommunity's source code repositories from Mercurial (hg) to GitGitGitGit
• ProposedProposedProposedProposed totototo target for JDK 16target for JDK 16target for JDK 16target for JDK 16
• GoalsGoalsGoalsGoals
• MigrateMigrateMigrateMigrate all singleall singleall singleall single----repositoryrepositoryrepositoryrepository OpenJDKOpenJDKOpenJDKOpenJDK Projects from Mercurial toProjects from Mercurial toProjects from Mercurial toProjects from Mercurial to GitGitGitGit
• PreservePreservePreservePreserve all version control history, including tagsall version control history, including tagsall version control history, including tagsall version control history, including tags
• ReformatReformatReformatReformat commit messages according tocommit messages according tocommit messages according tocommit messages according to GitGitGitGit best practicesbest practicesbest practicesbest practices
• PortPortPortPort thethethethe jcheckjcheckjcheckjcheck,,,, webrevwebrevwebrevwebrev, and, and, and, and defpathdefpathdefpathdefpath tools totools totools totools to GitGitGitGit
• CreateCreateCreateCreate a tool to translate between Mercurial anda tool to translate between Mercurial anda tool to translate between Mercurial anda tool to translate between Mercurial and GitGitGitGit hasheshasheshasheshashes
70. Project Skara (2)
• JEP 369: Migrate toJEP 369: Migrate toJEP 369: Migrate toJEP 369: Migrate to GitHubGitHubGitHubGitHub
• HostHostHostHost thethethethe OpenJDKOpenJDKOpenJDKOpenJDK Community'sCommunity'sCommunity'sCommunity's GitGitGitGit repositories on GitHub. In concert with JEP 357 (Migrate from Mercurial torepositories on GitHub. In concert with JEP 357 (Migrate from Mercurial torepositories on GitHub. In concert with JEP 357 (Migrate from Mercurial torepositories on GitHub. In concert with JEP 357 (Migrate from Mercurial to GitGitGitGit), this), this), this), this
would migrate all singlewould migrate all singlewould migrate all singlewould migrate all single----repositoryrepositoryrepositoryrepository OpenJDKOpenJDKOpenJDKOpenJDK Projects to GitHub, including both JDK feature releases and JDK updateProjects to GitHub, including both JDK feature releases and JDK updateProjects to GitHub, including both JDK feature releases and JDK updateProjects to GitHub, including both JDK feature releases and JDK update
releases for versions 11 andreleases for versions 11 andreleases for versions 11 andreleases for versions 11 and laterlaterlaterlater
• ProposedProposedProposedProposed totototo target for JDK 16target for JDK 16target for JDK 16target for JDK 16
• HostHostHostHost allallallall OpenJDKOpenJDKOpenJDKOpenJDK GitGitGitGit repositories at https://github.com/openjdkrepositories at https://github.com/openjdkrepositories at https://github.com/openjdkrepositories at https://github.com/openjdk////
• RunRunRunRun prepreprepre----commit checks (commit checks (commit checks (commit checks (jcheckjcheckjcheckjcheck) before every) before every) before every) before every pushpushpushpush
• IntegrateIntegrateIntegrateIntegrate existingexistingexistingexisting OpenJDKOpenJDKOpenJDKOpenJDK servicesservicesservicesservices
• EnableEnableEnableEnable multiple ways of interacting withmultiple ways of interacting withmultiple ways of interacting withmultiple ways of interacting with GitHubGitHubGitHubGitHub
• EnsureEnsureEnsureEnsure that workflows structurally similar to the existing ethat workflows structurally similar to the existing ethat workflows structurally similar to the existing ethat workflows structurally similar to the existing e----mail andmail andmail andmail and webrevwebrevwebrevwebrev based workflows arebased workflows arebased workflows arebased workflows are supportedsupportedsupportedsupported
• PreservePreservePreservePreserve and archive alland archive alland archive alland archive all metadatametadatametadatametadata
• EnsureEnsureEnsureEnsure thatthatthatthat OpenJDKOpenJDKOpenJDKOpenJDK Community can always move to a different sourceCommunity can always move to a different sourceCommunity can always move to a different sourceCommunity can always move to a different source----code hostingcode hostingcode hostingcode hosting providerproviderproviderprovider
• DoDoDoDo not require developers to installnot require developers to installnot require developers to installnot require developers to install OpenJDKOpenJDKOpenJDKOpenJDK specific tools in order tospecific tools in order tospecific tools in order tospecific tools in order to contributecontributecontributecontribute
• DoDoDoDo not change thenot change thenot change thenot change the OpenJDKOpenJDKOpenJDKOpenJDK BylawsBylawsBylawsBylaws
• DoDoDoDo not change thenot change thenot change thenot change the OpenJDKOpenJDKOpenJDKOpenJDK CensusCensusCensusCensus
71. Key Java Platform Investments
• Security & Vulnerability
• Approachability & Continued language enhancements
• Cloud Containers & Observability
• Data optimization & Density
• Predictability at Scale
• Performance & Efficiency
• Hardware Acceleration (GPU, NVM, etc.)