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
.
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
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
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)
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
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!