SlideShare una empresa de Scribd logo
1 de 32
@martin_fmi
JDK 10 sneak peek
Martin Toshev
Martin Toshev
@martin_fmi
Who am I
Software consultant (CoffeeCupConsulting)
BG JUG board member (http://jug.bg)
OpenJDK and Oracle RBDMS enthusiast
Twitter: @martin_fmi
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
Agenda
Release overview
Feature highlights
What’s next ?
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
Release overview
@martin_fmi
JDK 10
•First 6-month cadence release
•An STS (short-term release): end of support in September
•Class File Version Number: 54.0
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
JDK 10
• Highlight of the release is the introduction of the var keyword
• A lot of focus put on internal performance and code improvements
• Not so many new features
• Still weak adoption from community (along with JDK 9) at present
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
Implemented JEPs
•286: Local-Variable Type Inference
•296: Consolidate the JDK Forest
into a Single Repository
•304: Garbage-Collector Interface
•307: Parallel Full GC for G1
•310: Application Class-Data Sharing
•312: Thread-Local Handshakes
Martin Toshev Prague, 19-20 October 2017
• 313: Remove the Native-Header
Generation Tool (javah)
• 314: Additional Unicode
Language-Tag Extensions
• 316: Heap Allocation
on Alternative Memory Devices
• 317: Experimental Java-Based JIT Compiler
• 319: Root Certificates
• 322: Time-Based Release Versioning
@martin_fmi
Other enhancements
Martin Toshev Prague, 19-20 October 2017
•Docker container awareness
•Collections API improvements
•Optional API improvement ( orElseThrow() )
•Removed and deprecated APIs
•Less significant enhancements (such as faster JShell startup and others)
@martin_fmi
Feature highlights
@martin_fmi
JEP 286: Local-Variable Type Inference
•var keyword introduced in the Java language
•allows developers to reduce the amount of boilerplate code they write
Martin Toshev Prague, 19-20 October 2017
List<String> entities = new LinkedList<String>();
var entities = new LinkedList<String>();
@martin_fmi
JEP 310: Application Class-Data Sharing
•Provides a mechanism to reduce memory footprint of class metadata
across JVM processes
•Provides a mechanism to reduce application startup time
•At present supports only classes bundled in JAR files
•Based on the CDS feature introduced in JDK 5 (which works only with the
bootstrap class loader)
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
JEP 310: Application Class-Data Sharing
1.Determine application classes for AppCDS archive:
Martin Toshev Prague, 19-20 October 2017
java -XX:+UnlockCommercialFeatures -Xshare:off -XX:+UseAppCDS
-XX:DumpLoadedClassList=application.lst -cp application.jar Main
@martin_fmi
JEP 310: Application Class-Data Sharing
2. Generate the AppCDS archive:
Martin Toshev Prague, 19-20 October 2017
java -XX:+UnlockCommercialFeatures -Xshare:dump -XX:+UseAppCDS
-XX:SharedClassListFile=application.lst
-XX:SharedArchiveFile=application.jsa
@martin_fmi
JEP 310: Application Class-Data Sharing
3. Run the application with the AppCDS archive:
Martin Toshev Prague, 19-20 October 2017
java -XX:+UnlockCommercialFeatures -Xshare:on -XX:+UseAppCDS
-XX:SharedArchiveFile=application.jsa -cp application.jar Main
@martin_fmi
JEP 317: Experimental Java-Based JIT Compiler
•Enables Graal as an experimental JIT compiler on the Linux/x64 platform
Martin Toshev Prague, 19-20 October 2017
-XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler
@martin_fmi
Internal performance improvements
•JEP 307: Parallel Full GC for G1
- full GC made parallel
•JEP 312: Thread-Local Handshakes
- optimization techniques allowing to stop individual threads
- enabled by default
- can be disabled:
Martin Toshev Prague, 19-20 October 2017
-XX:ParallelGCThreads=<count>
-XX:ThreadLocalHandshakes=false
@martin_fmi
Internal code restructuring
•JEP 296: Consolidate the JDK Forest into a Single Repository
- previously there were child repositories (langtools, jaxp etc.)
- these are now consolidated as part of the root repository
•JEP 304: Garbage-Collector Interface
- changed source structure to allow for easier addition of new GCs
- previous structure didn’t sandbox GCs enough
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
JEP 319: Root Certificates
•cacerts file now contains a default set of Cas
•they are part of Oracle’s Java SE Root CA program
Martin Toshev Prague, 19-20 October 2017
keytool -list -v -keystore %JAVA_HOME%jre_10.0.1libsecuritycacerts
@martin_fmi
JEP 313: Remove the Native-Header
Generation Tool (javah)
•The javah tool removed from JDK distribution
•javah functionality replaced by enhancements to javac
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
JEP 314: Additional Unicode
Language-Tag Extensions
•Java.util.Locale and other APIs (such as java.text.DateFormat) support the
following language-tag extensions:
• cu (currency type)
• fw (first day of week)
• rg (region override)
• tz (time zone)
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
JEP 316: Heap Allocation
on Alternative Memory Devices
•Provides the ability to allocate heap space on alternative memory devices
Martin Toshev Prague, 19-20 October 2017
-
XX:AllocateHeapAt=<path>
@martin_fmi
JEP 322: Time-Based Release Versioning
•Required due to the 6-month release cadence
•Runtime.Version API enhanced with new methods
•Two new system properties added:
o java.version.date
o java.vendor.version
•Java launcher enhanced to display additional version information
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
Docker container awareness
•The JVM is modified to support Docker container awareness
•Proper information (CPU/memory) retrieved from the container rather than
the OS
Martin Toshev Prague, 19-20 October 2017
-XX:-UseContainerSupport
@martin_fmi
Docker container awareness
•More options introduced in that regard:
Martin Toshev Prague, 19-20 October 2017
-XX:ActiveProcessorCount=<count>
-XX:InitialRAMPercentage=<percentage>
-XX:MaxRAMPercentage=<percentage>
-XX:MinRAMPercentage=<percentage>
@martin_fmi
Optional API
•A new method introduced: orElseThrow()
•A better alternative of get()
Martin Toshev Prague, 19-20 October 2017
Optional x = Optional.ofNullable(null);
x.orElseThrow( () -> {
return new RuntimeException("Optional value is null");});
@martin_fmi
Collections API
• New collection API methods that allow the creation of unmodifiable
collections:
Martin Toshev Prague, 19-20 October 2017
List<String> entitiesListCopy = List.copyOf(entitiesList);
Set<String> entitiesSetCopy = Set.copyOf(entitiesSet);
Map<String, String> entitiesMapCopy = Map.copyOf(entitiesMap);
entitiesList.stream().collect(Collectors.toUnmodifiableList());
entitiesSet.stream().collect(Collectors.toUnmodifiableSet());
entitiesMap.entrySet().stream().collect(
Collectors.toUnmodifiableMap(e -> e.getKey(), e -> e.getValue()));
@martin_fmi
What’s next ?
@martin_fmi
JDK 11
• Target proposals:
o 309: Dynamic Class-File Constants 
o 318: Epsilon: A No-Op Garbage Collector 
o 320: Remove the Java EE and CORBA Modules 
o 321: HTTP Client (Standard) 
o 323: Local-Variable Syntax for Lambda Parameters 
o 324: Key Agreement with Curve25519 and Curve448 
o 327: Unicode 10 
o 328: Flight Recorder 
o 329: ChaCha20 and Poly1305 Cryptographic Algorithms 
o 330: Launch Single-File Source-Code Programs 
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
JDK <N>
• Project Panama
• Project Valhalla
• Project Loom
• GraalVM/Truffle
• Project Metropolis
• More to come …
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
Summary
• JDK 10 is a milestone for new release cadence of the JDK
• Major highlights: var keyword, AppCDS, Graal JIT experimental support
• Provides performance improvements
• Provides container awareness for JVM applications
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
References
JDK 10 enhancement proposals
http://openjdk.java.net/projects/jdk/10/
JDK 10 release notes
http://openjdk.java.net/projects/jdk/10/
Martin Toshev Prague, 19-20 October 2017
@martin_fmi
References
JDK 10 Whitepaper
https://developer.oracle.com/devo/res/pdf/1385446602743/Oracle-
Java10.pdf
Java SE 10 final release specification
http://cr.openjdk.java.net/~iris/se/10/latestSpec/
Martin Toshev Prague, 19-20 October 2017

Más contenido relacionado

La actualidad más candente

MongoDB Tick Data Presentation
MongoDB Tick Data PresentationMongoDB Tick Data Presentation
MongoDB Tick Data Presentation
MongoDB
 
20101020 harper
20101020 harper20101020 harper
20101020 harper
charper
 

La actualidad más candente (20)

MongoDB + Spring
MongoDB + SpringMongoDB + Spring
MongoDB + Spring
 
iRODS UGM 2018 Fair data management and DISQOVERability
iRODS UGM 2018 Fair data management and DISQOVERabilityiRODS UGM 2018 Fair data management and DISQOVERability
iRODS UGM 2018 Fair data management and DISQOVERability
 
Gh registry day_1_edited
Gh registry day_1_editedGh registry day_1_edited
Gh registry day_1_edited
 
Level 101 for Presto: What is PrestoDB?
Level 101 for Presto: What is PrestoDB?Level 101 for Presto: What is PrestoDB?
Level 101 for Presto: What is PrestoDB?
 
Datafying Bitcoins
Datafying BitcoinsDatafying Bitcoins
Datafying Bitcoins
 
Data pipelines observability: OpenLineage & Marquez
Data pipelines observability:  OpenLineage & MarquezData pipelines observability:  OpenLineage & Marquez
Data pipelines observability: OpenLineage & Marquez
 
Open core summit: Observability for data pipelines with OpenLineage
Open core summit: Observability for data pipelines with OpenLineageOpen core summit: Observability for data pipelines with OpenLineage
Open core summit: Observability for data pipelines with OpenLineage
 
Python and MongoDB as a Market Data Platform by James Blackburn
Python and MongoDB as a Market Data Platform by James BlackburnPython and MongoDB as a Market Data Platform by James Blackburn
Python and MongoDB as a Market Data Platform by James Blackburn
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational Awareness
 
Expert Roundtable: The Future of Metadata After Hive Metastore
Expert Roundtable: The Future of Metadata After Hive MetastoreExpert Roundtable: The Future of Metadata After Hive Metastore
Expert Roundtable: The Future of Metadata After Hive Metastore
 
Linking Metrics to Logs using Loki
Linking Metrics to Logs using LokiLinking Metrics to Logs using Loki
Linking Metrics to Logs using Loki
 
Data lineage and observability with Marquez - subsurface 2020
Data lineage and observability with Marquez - subsurface 2020Data lineage and observability with Marquez - subsurface 2020
Data lineage and observability with Marquez - subsurface 2020
 
OAISRB
OAISRBOAISRB
OAISRB
 
MongoDB Schema Design Tips & Tricks
MongoDB Schema Design Tips & TricksMongoDB Schema Design Tips & Tricks
MongoDB Schema Design Tips & Tricks
 
MongoDB Tick Data Presentation
MongoDB Tick Data PresentationMongoDB Tick Data Presentation
MongoDB Tick Data Presentation
 
Cncf microservices security
Cncf microservices securityCncf microservices security
Cncf microservices security
 
20101020 harper
20101020 harper20101020 harper
20101020 harper
 
Handle 08
Handle 08Handle 08
Handle 08
 
Client-Assisted Memento Aggregation Using the Prefer Header
Client-Assisted Memento Aggregation Using the Prefer HeaderClient-Assisted Memento Aggregation Using the Prefer Header
Client-Assisted Memento Aggregation Using the Prefer Header
 
How to deploy a smart city platform?
How to deploy a smart city platform?How to deploy a smart city platform?
How to deploy a smart city platform?
 

Similar a Jdk 10 sneak peek

ALM Search Presentation for the VSS Arch Council
ALM Search Presentation for the VSS Arch CouncilALM Search Presentation for the VSS Arch Council
ALM Search Presentation for the VSS Arch Council
Sunita Shrivastava
 
IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013
Stuart Myles
 

Similar a Jdk 10 sneak peek (20)

Polyglot metadata for Hadoop
Polyglot metadata for HadoopPolyglot metadata for Hadoop
Polyglot metadata for Hadoop
 
Spark Community Update - Spark Summit San Francisco 2015
Spark Community Update - Spark Summit San Francisco 2015Spark Community Update - Spark Summit San Francisco 2015
Spark Community Update - Spark Summit San Francisco 2015
 
Devteach 2017 Store 2 million of audit a day into elasticsearch
Devteach 2017 Store 2 million of audit a day into elasticsearchDevteach 2017 Store 2 million of audit a day into elasticsearch
Devteach 2017 Store 2 million of audit a day into elasticsearch
 
Introduction to Yasson
Introduction to YassonIntroduction to Yasson
Introduction to Yasson
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10
 
ALM Search Presentation for the VSS Arch Council
ALM Search Presentation for the VSS Arch CouncilALM Search Presentation for the VSS Arch Council
ALM Search Presentation for the VSS Arch Council
 
Intro elasticsearch taswarbhatti
Intro elasticsearch taswarbhattiIntro elasticsearch taswarbhatti
Intro elasticsearch taswarbhatti
 
IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013
 
GBIF API Hackaton, March 2015, Leiden, Sp2000/GBIF
GBIF API Hackaton, March 2015, Leiden, Sp2000/GBIFGBIF API Hackaton, March 2015, Leiden, Sp2000/GBIF
GBIF API Hackaton, March 2015, Leiden, Sp2000/GBIF
 
Lessons Learned While Scaling Elasticsearch at Vinted
Lessons Learned While Scaling Elasticsearch at VintedLessons Learned While Scaling Elasticsearch at Vinted
Lessons Learned While Scaling Elasticsearch at Vinted
 
Getty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic RepresentationGetty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic Representation
 
James Coplien: Trygve - Oct 17, 2016
James Coplien: Trygve - Oct 17, 2016James Coplien: Trygve - Oct 17, 2016
James Coplien: Trygve - Oct 17, 2016
 
2nd RINASim Webinar
2nd RINASim Webinar2nd RINASim Webinar
2nd RINASim Webinar
 
Bicod2017
Bicod2017Bicod2017
Bicod2017
 
BICOD-2017
BICOD-2017BICOD-2017
BICOD-2017
 
Data access and data extraction services within the Land Imagery Portal
Data access and data extraction services within the Land Imagery PortalData access and data extraction services within the Land Imagery Portal
Data access and data extraction services within the Land Imagery Portal
 
Tech WG report 2011
Tech WG report 2011Tech WG report 2011
Tech WG report 2011
 
Boosting command line experience with python and awk
Boosting command line experience with python and awkBoosting command line experience with python and awk
Boosting command line experience with python and awk
 
Tolog Updates
Tolog UpdatesTolog Updates
Tolog Updates
 
Visualizing Austin's data with Elasticsearch and Kibana
Visualizing Austin's data with Elasticsearch and KibanaVisualizing Austin's data with Elasticsearch and Kibana
Visualizing Austin's data with Elasticsearch and Kibana
 

Más de Martin Toshev

Concurrency Utilities in Java 8
Concurrency Utilities in Java 8Concurrency Utilities in Java 8
Concurrency Utilities in Java 8
Martin Toshev
 
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Martin Toshev
 

Más de Martin Toshev (20)

Building highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkBuilding highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache Spark
 
Big data processing with Apache Spark and Oracle Database
Big data processing with Apache Spark and Oracle DatabaseBig data processing with Apache Spark and Oracle Database
Big data processing with Apache Spark and Oracle Database
 
Practical security In a modular world
Practical security In a modular worldPractical security In a modular world
Practical security In a modular world
 
Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
 
Writing Stored Procedures in Oracle RDBMS
Writing Stored Procedures in Oracle RDBMSWriting Stored Procedures in Oracle RDBMS
Writing Stored Procedures in Oracle RDBMS
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
Security Architecture of the Java platform
Security Architecture of the Java platformSecurity Architecture of the Java platform
Security Architecture of the Java platform
 
Oracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsOracle Database 12c Attack Vectors
Oracle Database 12c Attack Vectors
 
JVM++: The Graal VM
JVM++: The Graal VMJVM++: The Graal VM
JVM++: The Graal VM
 
RxJS vs RxJava: Intro
RxJS vs RxJava: IntroRxJS vs RxJava: Intro
RxJS vs RxJava: Intro
 
Security Аrchitecture of Тhe Java Platform
Security Аrchitecture of Тhe Java PlatformSecurity Аrchitecture of Тhe Java Platform
Security Аrchitecture of Тhe Java Platform
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
Writing Stored Procedures with Oracle Database 12c
Writing Stored Procedures with Oracle Database 12cWriting Stored Procedures with Oracle Database 12c
Writing Stored Procedures with Oracle Database 12c
 
Concurrency Utilities in Java 8
Concurrency Utilities in Java 8Concurrency Utilities in Java 8
Concurrency Utilities in Java 8
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
 
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
 
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
 
Writing Java Stored Procedures in Oracle 12c
Writing Java Stored Procedures in Oracle 12cWriting Java Stored Procedures in Oracle 12c
Writing Java Stored Procedures in Oracle 12c
 
KDB database (EPAM tech talks, Sofia, April, 2015)
KDB database (EPAM tech talks, Sofia, April, 2015)KDB database (EPAM tech talks, Sofia, April, 2015)
KDB database (EPAM tech talks, Sofia, April, 2015)
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in development
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Jdk 10 sneak peek

  • 1. @martin_fmi JDK 10 sneak peek Martin Toshev Martin Toshev
  • 2. @martin_fmi Who am I Software consultant (CoffeeCupConsulting) BG JUG board member (http://jug.bg) OpenJDK and Oracle RBDMS enthusiast Twitter: @martin_fmi Martin Toshev Prague, 19-20 October 2017
  • 3. @martin_fmi Agenda Release overview Feature highlights What’s next ? Martin Toshev Prague, 19-20 October 2017
  • 5. @martin_fmi JDK 10 •First 6-month cadence release •An STS (short-term release): end of support in September •Class File Version Number: 54.0 Martin Toshev Prague, 19-20 October 2017
  • 6. @martin_fmi JDK 10 • Highlight of the release is the introduction of the var keyword • A lot of focus put on internal performance and code improvements • Not so many new features • Still weak adoption from community (along with JDK 9) at present Martin Toshev Prague, 19-20 October 2017
  • 7. @martin_fmi Implemented JEPs •286: Local-Variable Type Inference •296: Consolidate the JDK Forest into a Single Repository •304: Garbage-Collector Interface •307: Parallel Full GC for G1 •310: Application Class-Data Sharing •312: Thread-Local Handshakes Martin Toshev Prague, 19-20 October 2017 • 313: Remove the Native-Header Generation Tool (javah) • 314: Additional Unicode Language-Tag Extensions • 316: Heap Allocation on Alternative Memory Devices • 317: Experimental Java-Based JIT Compiler • 319: Root Certificates • 322: Time-Based Release Versioning
  • 8. @martin_fmi Other enhancements Martin Toshev Prague, 19-20 October 2017 •Docker container awareness •Collections API improvements •Optional API improvement ( orElseThrow() ) •Removed and deprecated APIs •Less significant enhancements (such as faster JShell startup and others)
  • 10. @martin_fmi JEP 286: Local-Variable Type Inference •var keyword introduced in the Java language •allows developers to reduce the amount of boilerplate code they write Martin Toshev Prague, 19-20 October 2017 List<String> entities = new LinkedList<String>(); var entities = new LinkedList<String>();
  • 11. @martin_fmi JEP 310: Application Class-Data Sharing •Provides a mechanism to reduce memory footprint of class metadata across JVM processes •Provides a mechanism to reduce application startup time •At present supports only classes bundled in JAR files •Based on the CDS feature introduced in JDK 5 (which works only with the bootstrap class loader) Martin Toshev Prague, 19-20 October 2017
  • 12. @martin_fmi JEP 310: Application Class-Data Sharing 1.Determine application classes for AppCDS archive: Martin Toshev Prague, 19-20 October 2017 java -XX:+UnlockCommercialFeatures -Xshare:off -XX:+UseAppCDS -XX:DumpLoadedClassList=application.lst -cp application.jar Main
  • 13. @martin_fmi JEP 310: Application Class-Data Sharing 2. Generate the AppCDS archive: Martin Toshev Prague, 19-20 October 2017 java -XX:+UnlockCommercialFeatures -Xshare:dump -XX:+UseAppCDS -XX:SharedClassListFile=application.lst -XX:SharedArchiveFile=application.jsa
  • 14. @martin_fmi JEP 310: Application Class-Data Sharing 3. Run the application with the AppCDS archive: Martin Toshev Prague, 19-20 October 2017 java -XX:+UnlockCommercialFeatures -Xshare:on -XX:+UseAppCDS -XX:SharedArchiveFile=application.jsa -cp application.jar Main
  • 15. @martin_fmi JEP 317: Experimental Java-Based JIT Compiler •Enables Graal as an experimental JIT compiler on the Linux/x64 platform Martin Toshev Prague, 19-20 October 2017 -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler
  • 16. @martin_fmi Internal performance improvements •JEP 307: Parallel Full GC for G1 - full GC made parallel •JEP 312: Thread-Local Handshakes - optimization techniques allowing to stop individual threads - enabled by default - can be disabled: Martin Toshev Prague, 19-20 October 2017 -XX:ParallelGCThreads=<count> -XX:ThreadLocalHandshakes=false
  • 17. @martin_fmi Internal code restructuring •JEP 296: Consolidate the JDK Forest into a Single Repository - previously there were child repositories (langtools, jaxp etc.) - these are now consolidated as part of the root repository •JEP 304: Garbage-Collector Interface - changed source structure to allow for easier addition of new GCs - previous structure didn’t sandbox GCs enough Martin Toshev Prague, 19-20 October 2017
  • 18. @martin_fmi JEP 319: Root Certificates •cacerts file now contains a default set of Cas •they are part of Oracle’s Java SE Root CA program Martin Toshev Prague, 19-20 October 2017 keytool -list -v -keystore %JAVA_HOME%jre_10.0.1libsecuritycacerts
  • 19. @martin_fmi JEP 313: Remove the Native-Header Generation Tool (javah) •The javah tool removed from JDK distribution •javah functionality replaced by enhancements to javac Martin Toshev Prague, 19-20 October 2017
  • 20. @martin_fmi JEP 314: Additional Unicode Language-Tag Extensions •Java.util.Locale and other APIs (such as java.text.DateFormat) support the following language-tag extensions: • cu (currency type) • fw (first day of week) • rg (region override) • tz (time zone) Martin Toshev Prague, 19-20 October 2017
  • 21. @martin_fmi JEP 316: Heap Allocation on Alternative Memory Devices •Provides the ability to allocate heap space on alternative memory devices Martin Toshev Prague, 19-20 October 2017 - XX:AllocateHeapAt=<path>
  • 22. @martin_fmi JEP 322: Time-Based Release Versioning •Required due to the 6-month release cadence •Runtime.Version API enhanced with new methods •Two new system properties added: o java.version.date o java.vendor.version •Java launcher enhanced to display additional version information Martin Toshev Prague, 19-20 October 2017
  • 23. @martin_fmi Docker container awareness •The JVM is modified to support Docker container awareness •Proper information (CPU/memory) retrieved from the container rather than the OS Martin Toshev Prague, 19-20 October 2017 -XX:-UseContainerSupport
  • 24. @martin_fmi Docker container awareness •More options introduced in that regard: Martin Toshev Prague, 19-20 October 2017 -XX:ActiveProcessorCount=<count> -XX:InitialRAMPercentage=<percentage> -XX:MaxRAMPercentage=<percentage> -XX:MinRAMPercentage=<percentage>
  • 25. @martin_fmi Optional API •A new method introduced: orElseThrow() •A better alternative of get() Martin Toshev Prague, 19-20 October 2017 Optional x = Optional.ofNullable(null); x.orElseThrow( () -> { return new RuntimeException("Optional value is null");});
  • 26. @martin_fmi Collections API • New collection API methods that allow the creation of unmodifiable collections: Martin Toshev Prague, 19-20 October 2017 List<String> entitiesListCopy = List.copyOf(entitiesList); Set<String> entitiesSetCopy = Set.copyOf(entitiesSet); Map<String, String> entitiesMapCopy = Map.copyOf(entitiesMap); entitiesList.stream().collect(Collectors.toUnmodifiableList()); entitiesSet.stream().collect(Collectors.toUnmodifiableSet()); entitiesMap.entrySet().stream().collect( Collectors.toUnmodifiableMap(e -> e.getKey(), e -> e.getValue()));
  • 28. @martin_fmi JDK 11 • Target proposals: o 309: Dynamic Class-File Constants  o 318: Epsilon: A No-Op Garbage Collector  o 320: Remove the Java EE and CORBA Modules  o 321: HTTP Client (Standard)  o 323: Local-Variable Syntax for Lambda Parameters  o 324: Key Agreement with Curve25519 and Curve448  o 327: Unicode 10  o 328: Flight Recorder  o 329: ChaCha20 and Poly1305 Cryptographic Algorithms  o 330: Launch Single-File Source-Code Programs  Martin Toshev Prague, 19-20 October 2017
  • 29. @martin_fmi JDK <N> • Project Panama • Project Valhalla • Project Loom • GraalVM/Truffle • Project Metropolis • More to come … Martin Toshev Prague, 19-20 October 2017
  • 30. @martin_fmi Summary • JDK 10 is a milestone for new release cadence of the JDK • Major highlights: var keyword, AppCDS, Graal JIT experimental support • Provides performance improvements • Provides container awareness for JVM applications Martin Toshev Prague, 19-20 October 2017
  • 31. @martin_fmi References JDK 10 enhancement proposals http://openjdk.java.net/projects/jdk/10/ JDK 10 release notes http://openjdk.java.net/projects/jdk/10/ Martin Toshev Prague, 19-20 October 2017
  • 32. @martin_fmi References JDK 10 Whitepaper https://developer.oracle.com/devo/res/pdf/1385446602743/Oracle- Java10.pdf Java SE 10 final release specification http://cr.openjdk.java.net/~iris/se/10/latestSpec/ Martin Toshev Prague, 19-20 October 2017

Notas del editor

  1. TLS being the predecessor of SSL is not interoperable with SSL …
  2. TLS being the predecessor of SSL is not interoperable with SSL …
  3. TLS being the predecessor of SSL is not interoperable with SSL …
  4. TLS being the predecessor of SSL is not interoperable with SSL …
  5. TLS being the predecessor of SSL is not interoperable with SSL …
  6. TLS being the predecessor of SSL is not interoperable with SSL …
  7. TLS being the predecessor of SSL is not interoperable with SSL …
  8. TLS being the predecessor of SSL is not interoperable with SSL …
  9. TLS being the predecessor of SSL is not interoperable with SSL …
  10. TLS being the predecessor of SSL is not interoperable with SSL …
  11. TLS being the predecessor of SSL is not interoperable with SSL …
  12. TLS being the predecessor of SSL is not interoperable with SSL …
  13. TLS being the predecessor of SSL is not interoperable with SSL …
  14. TLS being the predecessor of SSL is not interoperable with SSL …
  15. TLS being the predecessor of SSL is not interoperable with SSL …
  16. TLS being the predecessor of SSL is not interoperable with SSL …
  17. TLS being the predecessor of SSL is not interoperable with SSL …
  18. TLS being the predecessor of SSL is not interoperable with SSL …
  19. TLS being the predecessor of SSL is not interoperable with SSL …
  20. TLS being the predecessor of SSL is not interoperable with SSL …
  21. TLS being the predecessor of SSL is not interoperable with SSL …
  22. TLS being the predecessor of SSL is not interoperable with SSL …
  23. TLS being the predecessor of SSL is not interoperable with SSL …