SlideShare a Scribd company logo
1 of 34
The future of Java
Background: The Goal of JDK 9
Make Java SE more flexible and scalable
Improve security and maintainability
Make it easier to construct, maintain, deploy and
upgrade large applications
Enable improved performance
Schedule
26.05.16 Feature Complete
11.08.16 All Tests Run
01.09.16 Rampdown Start
20.10.16 Zero Bug Bounce
01.12.16 Rampdown Phase 2
26.01.17 Final Release Candidate
23.03.17 General Availability
Changes
API changes
Internal changes
Security
Tools
VM
Jigsaw
misc
More Concurrency Updates
Stack-walking API
Process API updates
HTTP/2 Client
Platform Logging API and Sevices
Enhanced Method Handles
Variable Handles
Milling Project Coin
Factory methods for Collections
API Changes
More Concurrency Updates (JEP 266)
Basic support for Reactive Streams (Flow and
SubmissionPublisher API)
CompletableFuture enhancements
○ Support delays and timeouts
○ Better support for subclassing
○ Few utility methods
Merge JSR 166 implementation to JDK with all the
improvements.
Stack-Walking API (JEP 259)
Provide a way to walk through Stacktraces with filtering,
lazy access to elements. New API:
instead of existing
internal API (sun.reflect.Reflection.getCallerClass)
Process API Update (JEP 102)
Enhance Process API to control native OS processes. API:
ProcessHandle to access system processes not spawned by the API
Updates to Process to link to
Security provisions to control access to
Information about the children of a process, direct and indirect
Optional Information (based on OS availability) about a process including
command, arguments, start time, and cputime
HTTP/2 Client (JEP 110)
Create a new API to replace existing HttpURLConnection API
with following improvements:
Support asynchronous calls
Support WebSocket protocol
Support HTTP/2 a s well as HTTP 1.0 and HTTP 1.1
Enhanced Method Handles (JEP 274)
Create new ’s which will allow to create the
following constructs:
Loops
Try/finally blocks
Class lookup
Build MethodHandle fro non-abstract methods in interfaces
Better argument handling(spreading, collecting)
Variable Handles (JEP 193)
Currently is under construction and not available in JDK9 EA
Replace CAS operations from
Provide better performance comparing to
.
Milling Project
Coin (JEP 213)
Underscore no more legal
identifier name!
Milling Project Coin (JEP 213)
Now Would be
Milling Project Coin (JEP 213)
Allow diamond with anonymous classes if the argument
type of the inferred type is denotable
private methods in interfaces
Milling Project Coin
(JEP 213)
static methods in interfaces for free!
Convenience Factory Methods for
Collections (JEP 269)
All of them are static interface methods.
Internal Changes
Compact Strings
UTF-8 property files
Elide deprecation warnings on imports
Use CLDR by default
Improve contended locking
Update Xerx version in JDK to 2.11
Unicode-8
Resolve lint and doclint warnings in JDK sourcebase
Security
DRBG-based SecureRandom implementation
DTLS (Datagram Transport Layer Security)
Improve Secure Application Performance
Create Keystores by Default
Tools
JavaDoc
■ JavaDoc search
■ HTML5
■ Simplified Doclet API
JMH and harness test coverage
JShell
javac
■ Smart java compilation. Phase 2
■ Annotation pipeline 2.0
■ Tiered attribution to javac
■ Process import statements correctly
VM
New versioning scheme
Make G1 the Default Garbage Collector
Reserved stack areas for critical sections
Unified logging (VM/GC)
Segmented code cache
Remove GC combinations deprecated in JDK #8
Compiler control
Misc
Almost related to UI and Java 2D changes.
Platform-specific desktop features
Jigsaw
JEP 200: Modular JDK (Define the modules of JDK and their structure)
JEP 201: Modular Source code (reorganize JDK source code into a
modules, adjust compilers)
JEP 220: Modular Runtime Images
JEP 260: Encapsulate most internal API (The famous one thanks to
sun.misc.Unsafe)
JEP 261: Modular system (The implementations of JSR 376 )
Modular JDK
(JEP 260) Encapsulate most internal API
Encapsulate all non-critical internal APIs by default
Encapsulate all critical internal APIs for which supported
replacements exist in JDK 8
Do not encapsulate critical internal APIs
Deprecate them in JDK 9
Plan to remove in JDK 10
Provide a workaround via command-line flag
(JEP 260) Encapsulate most internal API
(Most functionality now available via
)
(Now
available via Stack-Walking API)
(JEP 260) Check the compatibility
Maven JDeps plugin
jdeps tool in JDK8 and improved in JDK9
> jdeps -jdkinternals .
-> jdk.scripting.nashorn
com.foo.bar.baz.client.BonusTotalsByNetworksTest (.)
-> jdk.nashorn.internal.ir.annotations.Ignore JDK internal API (jdk.scripting.
nashorn)
What is Module?
com.foo.bar
Code and Data
Declaration of what it exposes
Declaration of what it requires
Module Declaration
module-info.java
com.foo.bar
Code and Data
Declaration of what it exposes
Declaration of what it requires
Module Graph
com.foo.bar
com.foo.baz
java.base
java.sql
java.logging
Readability
com.foo.bar
Code and Data
requires com.foo.baz;
com.foo.baz
Code and Data
provides com.foo.baz.api;
Reads
No more public as it was before
Now
● public
● protected
● <default>
● private
Will be
● public for everyone
● public for specified
● public only within the module
● protected
● <default>
● private
Transitive dependencies
com.foo.bar
com.foo.baz
java.base
java.sql
java.logging
package com.sql;
public interface .Driver {
…..
Logger getParentLogger() …
..…
}
module java.sql {
requires …..
…….
requires public java.logging;
……..
}
Summary
Forget anything you’ve learnt about interfaces in Java
Make sure your code is compliant to JDK 9 changes
○ jdeps for the rescue
○ remove single underscore symbol identifiers
Look forward next session about Jigsaw!
Thanks for your attention!
Q/A?

More Related Content

What's hot

What's hot (20)

Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)
 
Moving Towards JDK 12
Moving Towards JDK 12Moving Towards JDK 12
Moving Towards JDK 12
 
JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
Managing an OSGi Framework with Apache Felix Web Console
Managing an OSGi Framework with  Apache Felix Web ConsoleManaging an OSGi Framework with  Apache Felix Web Console
Managing an OSGi Framework with Apache Felix Web Console
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
 
The latest features coming to Java 12
The latest features coming to Java 12The latest features coming to Java 12
The latest features coming to Java 12
 
Apache Felix Web Console
Apache Felix Web ConsoleApache Felix Web Console
Apache Felix Web Console
 
Java modules using project jigsaw@jdk 9
Java modules using project jigsaw@jdk 9Java modules using project jigsaw@jdk 9
Java modules using project jigsaw@jdk 9
 
Designing a play framework application
Designing a play framework applicationDesigning a play framework application
Designing a play framework application
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
 
Java 12 - New features in action
Java 12 -   New features in actionJava 12 -   New features in action
Java 12 - New features in action
 
Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9
 
[2018.10.19] 김용기 부장 - IAC on OpenStack (feat. ansible)
[2018.10.19] 김용기 부장 - IAC on OpenStack (feat. ansible)[2018.10.19] 김용기 부장 - IAC on OpenStack (feat. ansible)
[2018.10.19] 김용기 부장 - IAC on OpenStack (feat. ansible)
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoring
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9
 
MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)
 
OpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheConOpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheCon
 

Viewers also liked

Australian economic briefing by david rumbens (1)
Australian economic briefing by david rumbens (1)Australian economic briefing by david rumbens (1)
Australian economic briefing by david rumbens (1)
Sebastian Cohen
 
Chop saver business presentation updated oct 8 2015
Chop saver business presentation updated oct 8 2015Chop saver business presentation updated oct 8 2015
Chop saver business presentation updated oct 8 2015
Ryan Flynn
 
леонтьевамарья пммф
леонтьевамарья пммфлеонтьевамарья пммф
леонтьевамарья пммф
Ruslan Sabirov
 
Exp reserv
Exp reservExp reserv
Exp reserv
indesol
 
Mountain & Sponsorship by Manolis Mavroeidis
Mountain & Sponsorship by Manolis MavroeidisMountain & Sponsorship by Manolis Mavroeidis
Mountain & Sponsorship by Manolis Mavroeidis
Choregeo
 
teoría y práctica de la flauta - vol. 1 sonido - flauta traversa - trevor wye
teoría y práctica de la flauta - vol. 1 sonido - flauta traversa - trevor wyeteoría y práctica de la flauta - vol. 1 sonido - flauta traversa - trevor wye
teoría y práctica de la flauta - vol. 1 sonido - flauta traversa - trevor wye
conrado dangavs
 

Viewers also liked (16)

Australian economic briefing by david rumbens (1)
Australian economic briefing by david rumbens (1)Australian economic briefing by david rumbens (1)
Australian economic briefing by david rumbens (1)
 
Der Feinschmecker 24 in Kiev City Guide
Der Feinschmecker 24 in Kiev City GuideDer Feinschmecker 24 in Kiev City Guide
Der Feinschmecker 24 in Kiev City Guide
 
Chop saver business presentation updated oct 8 2015
Chop saver business presentation updated oct 8 2015Chop saver business presentation updated oct 8 2015
Chop saver business presentation updated oct 8 2015
 
леонтьевамарья пммф
леонтьевамарья пммфлеонтьевамарья пммф
леонтьевамарья пммф
 
Computadora
ComputadoraComputadora
Computadora
 
Exp reserv
Exp reservExp reserv
Exp reserv
 
rr resume
rr resumerr resume
rr resume
 
PAO BC Choregeο 2014 by Elias Katsogiannis
PAO BC Choregeο 2014 by Elias KatsogiannisPAO BC Choregeο 2014 by Elias Katsogiannis
PAO BC Choregeο 2014 by Elias Katsogiannis
 
Influenza: Enfermedad aguda infecciosa
Influenza: Enfermedad aguda infecciosaInfluenza: Enfermedad aguda infecciosa
Influenza: Enfermedad aguda infecciosa
 
IT Service Management Overview
IT Service Management OverviewIT Service Management Overview
IT Service Management Overview
 
Strategic development at virgin 2013
Strategic development at virgin 2013Strategic development at virgin 2013
Strategic development at virgin 2013
 
What should I practice ?
What should I practice ?What should I practice ?
What should I practice ?
 
Mountain & Sponsorship by Manolis Mavroeidis
Mountain & Sponsorship by Manolis MavroeidisMountain & Sponsorship by Manolis Mavroeidis
Mountain & Sponsorship by Manolis Mavroeidis
 
Métode de SAXO KLOSÉ
Métode de SAXO KLOSÉMétode de SAXO KLOSÉ
Métode de SAXO KLOSÉ
 
teoría y práctica de la flauta - vol. 1 sonido - flauta traversa - trevor wye
teoría y práctica de la flauta - vol. 1 sonido - flauta traversa - trevor wyeteoría y práctica de la flauta - vol. 1 sonido - flauta traversa - trevor wye
teoría y práctica de la flauta - vol. 1 sonido - flauta traversa - trevor wye
 
Mgt prestion
Mgt prestionMgt prestion
Mgt prestion
 

Similar to Illia shestakov - The Future of Java JDK #9

Java 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youJava 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for you
Dmitry Buzdin
 

Similar to Illia shestakov - The Future of Java JDK #9 (20)

Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1
 
Java 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youJava 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for you
 
Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
 
Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgp
 
JEE Programming - 01 Introduction
JEE Programming - 01 IntroductionJEE Programming - 01 Introduction
JEE Programming - 01 Introduction
 
JDK 9: 55 New Features
JDK 9: 55 New FeaturesJDK 9: 55 New Features
JDK 9: 55 New Features
 
A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)
 
Frontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the likeFrontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the like
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
 
A Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EEA Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EE
 
A Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EEA Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EE
 
Drools & jBPM future roadmap talk
Drools & jBPM future roadmap talkDrools & jBPM future roadmap talk
Drools & jBPM future roadmap talk
 
JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and BeyondJDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and Beyond
 
Java one 2010
Java one 2010Java one 2010
Java one 2010
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 
Java dev mar_2021_keynote
Java dev mar_2021_keynoteJava dev mar_2021_keynote
Java dev mar_2021_keynote
 
What's new in Java 11
What's new in Java 11What's new in Java 11
What's new in Java 11
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Illia shestakov - The Future of Java JDK #9

  • 2. Background: The Goal of JDK 9 Make Java SE more flexible and scalable Improve security and maintainability Make it easier to construct, maintain, deploy and upgrade large applications Enable improved performance
  • 3. Schedule 26.05.16 Feature Complete 11.08.16 All Tests Run 01.09.16 Rampdown Start 20.10.16 Zero Bug Bounce 01.12.16 Rampdown Phase 2 26.01.17 Final Release Candidate 23.03.17 General Availability
  • 5. More Concurrency Updates Stack-walking API Process API updates HTTP/2 Client Platform Logging API and Sevices Enhanced Method Handles Variable Handles Milling Project Coin Factory methods for Collections API Changes
  • 6. More Concurrency Updates (JEP 266) Basic support for Reactive Streams (Flow and SubmissionPublisher API) CompletableFuture enhancements ○ Support delays and timeouts ○ Better support for subclassing ○ Few utility methods Merge JSR 166 implementation to JDK with all the improvements.
  • 7. Stack-Walking API (JEP 259) Provide a way to walk through Stacktraces with filtering, lazy access to elements. New API: instead of existing internal API (sun.reflect.Reflection.getCallerClass)
  • 8. Process API Update (JEP 102) Enhance Process API to control native OS processes. API: ProcessHandle to access system processes not spawned by the API Updates to Process to link to Security provisions to control access to Information about the children of a process, direct and indirect Optional Information (based on OS availability) about a process including command, arguments, start time, and cputime
  • 9. HTTP/2 Client (JEP 110) Create a new API to replace existing HttpURLConnection API with following improvements: Support asynchronous calls Support WebSocket protocol Support HTTP/2 a s well as HTTP 1.0 and HTTP 1.1
  • 10. Enhanced Method Handles (JEP 274) Create new ’s which will allow to create the following constructs: Loops Try/finally blocks Class lookup Build MethodHandle fro non-abstract methods in interfaces Better argument handling(spreading, collecting)
  • 11. Variable Handles (JEP 193) Currently is under construction and not available in JDK9 EA Replace CAS operations from Provide better performance comparing to .
  • 12. Milling Project Coin (JEP 213) Underscore no more legal identifier name!
  • 13. Milling Project Coin (JEP 213) Now Would be
  • 14. Milling Project Coin (JEP 213) Allow diamond with anonymous classes if the argument type of the inferred type is denotable
  • 15. private methods in interfaces Milling Project Coin (JEP 213) static methods in interfaces for free!
  • 16. Convenience Factory Methods for Collections (JEP 269) All of them are static interface methods.
  • 17. Internal Changes Compact Strings UTF-8 property files Elide deprecation warnings on imports Use CLDR by default Improve contended locking Update Xerx version in JDK to 2.11 Unicode-8 Resolve lint and doclint warnings in JDK sourcebase
  • 18. Security DRBG-based SecureRandom implementation DTLS (Datagram Transport Layer Security) Improve Secure Application Performance Create Keystores by Default
  • 19. Tools JavaDoc ■ JavaDoc search ■ HTML5 ■ Simplified Doclet API JMH and harness test coverage JShell javac ■ Smart java compilation. Phase 2 ■ Annotation pipeline 2.0 ■ Tiered attribution to javac ■ Process import statements correctly
  • 20. VM New versioning scheme Make G1 the Default Garbage Collector Reserved stack areas for critical sections Unified logging (VM/GC) Segmented code cache Remove GC combinations deprecated in JDK #8 Compiler control
  • 21. Misc Almost related to UI and Java 2D changes. Platform-specific desktop features
  • 22. Jigsaw JEP 200: Modular JDK (Define the modules of JDK and their structure) JEP 201: Modular Source code (reorganize JDK source code into a modules, adjust compilers) JEP 220: Modular Runtime Images JEP 260: Encapsulate most internal API (The famous one thanks to sun.misc.Unsafe) JEP 261: Modular system (The implementations of JSR 376 )
  • 24. (JEP 260) Encapsulate most internal API Encapsulate all non-critical internal APIs by default Encapsulate all critical internal APIs for which supported replacements exist in JDK 8 Do not encapsulate critical internal APIs Deprecate them in JDK 9 Plan to remove in JDK 10 Provide a workaround via command-line flag
  • 25. (JEP 260) Encapsulate most internal API (Most functionality now available via ) (Now available via Stack-Walking API)
  • 26. (JEP 260) Check the compatibility Maven JDeps plugin jdeps tool in JDK8 and improved in JDK9 > jdeps -jdkinternals . -> jdk.scripting.nashorn com.foo.bar.baz.client.BonusTotalsByNetworksTest (.) -> jdk.nashorn.internal.ir.annotations.Ignore JDK internal API (jdk.scripting. nashorn)
  • 27. What is Module? com.foo.bar Code and Data Declaration of what it exposes Declaration of what it requires
  • 28. Module Declaration module-info.java com.foo.bar Code and Data Declaration of what it exposes Declaration of what it requires
  • 30. Readability com.foo.bar Code and Data requires com.foo.baz; com.foo.baz Code and Data provides com.foo.baz.api; Reads
  • 31. No more public as it was before Now ● public ● protected ● <default> ● private Will be ● public for everyone ● public for specified ● public only within the module ● protected ● <default> ● private
  • 32. Transitive dependencies com.foo.bar com.foo.baz java.base java.sql java.logging package com.sql; public interface .Driver { ….. Logger getParentLogger() … ..… } module java.sql { requires ….. ……. requires public java.logging; …….. }
  • 33. Summary Forget anything you’ve learnt about interfaces in Java Make sure your code is compliant to JDK 9 changes ○ jdeps for the rescue ○ remove single underscore symbol identifiers Look forward next session about Jigsaw! Thanks for your attention!
  • 34. Q/A?