Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's Up, Java?

What's Up, Java?

In the last 18 months Oracle shook Java’s world by announcing a new “release train”, the end of public updates for JDK8, Long-Term Support releases, new commercial licenses… Communication of these huge changes was so poorly done that you can still find a significant number of incorrect articles on the matter, and more than 40 Java Champions co-signed an open letter to clarify this mess. So, What’s Up, Java?

Avatar for Pierre-Arnaud Galiana

Pierre-Arnaud Galiana

January 30, 2019

Other Decks in Programming

Transcript

  1. What’s Up, Java? Brownbag @ ELCA 31st January 2019 Pierre-Arnaud

    Galiana - kwsoft.ch partner / head of research and innovation @piagadelic
  2. Let’s talk about… A new Release Cadence Java SE, OpenJDK,

    JDK builds Clarifying LTS, Updates and Support What Oracle JDK build? JDK Housekeeping Major improvements in JDKs 9, 10 and 11 Overview of Long Term Projects
  3. Release Cadence until JDK 9 if ( lotsOfBigAndSmallPlannedFeatures && estimation

    == aWildGuess && target == years(2) ) { shipSomeOfThatAfterAtLeast(years(3)); };
  4. Release Cadence from JDK 10 Released every 6 months Fixed

    releases in March and September JDK 10 in March 2018 JDK 11 in September 2018
  5. Release Cadence from JDK 10 Some benefits… Agility, at last!

    Features “board the release train” when ready Smaller features not blocked No more “end-of-big-release rush” → improves quality
  6. Release Cadence from JDK 10 Some consequences… Backward compatibility not

    guaranteed But: deprecation before removal (at least one release warning)
  7. Release Cadence from JDK 10 More consequences… LTS releases every

    3 years (Ubuntu’s model) JDK8 declared LTS → public updates stop in 01.2019 JDK9, JDK10 → feature releases, updates for only 6 months Next LTS: JDK11, JDK 17, JDK 23…
  8. Release Cadence from JDK 10 JDK11 - 2018.09 – LTS

    JDK12 - 2019.03 JDK13 - 2019.09 JDK14 - 2020.03 JDK15 - 2020.09 JDK16 - 2021.03 JDK17 - 2021.09 – LTS JDK18 - 2022.03 JDK19 - 2022.09 JDK20 - 2023.03 JDK21 - 2023.09 JDK22 - 2024.03 JDK23 - 2024.09 - LTS Can your code, along with all your dependencies, keep up with feature-releases?
  9. Clarification JavaSE, OpenJDK, JDK builds Oracle leads the Java SE

    specification efforts: docs.oracle.com/javase/specs OpenJDK is Oracle’s reference implementation: openjdk.java.net/projects/jdk anyone can take that source code, produce a build and publish it a certification process ensures the build is valid – the Java Community Process provides a Technology Compatibility Kit (TCK aka JCK) if build passes the TCK, it can be described as "Java SE compatible“ to be branded "Java SE“, vendor needs a commercial license from Oracle certification currently on a trust-basis, results not submitted to the JCP/Oracle for checking, and cannot be made public
  10. What Oracle JDK build? Oracle JDK vs Oracle OpenJDK Oracle

    JDK oracle.com/technetwork/java/javase under the Oracle Binary Code License (with FoU restrictions) Oracle OpenJDK jdk.java.net GPLv2 with CPE (no restrictions) Security and bug fix updates only until next JDK release No overlap of updates for previous version No concept of LTS
  11. What Oracle JDK build? Converged binaries Goal: identical binaries with

    different licenses Oracle open-sourcing proprietary features flight control, mission control, zgc... Oracle removing some closed-source parts browser plugin, web start, JavaFX
  12. ?

  13. Clarification LTS, Updates and Support LTS every 3y  3y

    of free public updates Oracle JDK, from 11… - requires a commercial support contract to be used in production - still free to download, to use for development, testing, demonstration, proof- of-concept…
  14. Clarification LTS, Updates and Support Oracle’s OpenJDK build - is

    free to use (functionally no difference) - on a different licence (GPLv2+CPE) - free updates until the next version is out Which means... …to receive free updates, you MUST update your JDK every 6 months!
  15. “With the recent changes to Oracle JDK distribution and support,

    there’s been considerable uncertainty over the rights to use Oracle JDK vs Oracle’s OpenJDK builds vs OpenJDK builds from other providers. There are also plans around free updates, and (new and existing) paid support models available from various vendors to consider.” Java Champions’ Open Letter, Sept. 2018
  16. Martijn Verburg AdoptOpenJDK co-lead, Java Champion, London JUG Leader, Member

    of JCP Executive Committee, Jakarta EE Steering Committee Member, CEO @ jClarity Hendrik Ebbers Java Champion, JUG Dortmund Leader, JSR EG member, Co- founder of Karakun Ivar Grimstad Java Champion, Malmö JUG Leader, JCP Executive Committee Member, EE4J PMC Lead, Jakarta EE WG Member Markus Eisele Java Champion Heinz Kabutz Java Champion, The Java Specialists’ Newsletter, JCrete Founder Ivan St. Ivanov Java Champion, Bulgarian JUG Leader, jPrime Conference Organizer, Virtual JUG Leader, VIDA Software co-founder and senior programmer Stephen Colebourne Java Champion, Creator Joda and ThreeTen projects Trisha Gee Java Champion, Sevilla Java User Group Leader, JCP Executive Committee Member, Java Developer Advocate for JetBrains Josh Long Java Champion, Spring Developer Advocate for Pivotal, best-selling book author and prolific speaker worldwide Gail Anderson Java Champion, Oracle Developer Champion, co-founder Anderson Software Group, Inc. Justin Lee Java Champion, JSR EG Member Andres Almiray Java Champion, JCP EC Member, Oracle Developer Champion, Hackergarten worldwide Enrique Zamudio Java Champion, JVMMX (Mexico City JUG), author of j8583, jAlarms, Ceylon to Javascript compiler Alan Williamson Java Champion, author, podcaster, CTO of MacLaurin Group Maurice Naftalin Java Champion, Oracle Developer Champion, author Mark Heckler Java Champion, Spring Developer Advocate for Pivotal, conference speaker, & published author Kirk Pepperdine Java Champion, jCrete cofounder, Performance tuning advocate, co- founder jClarity Matt Raible Java Champion, Web Developer, and Developer Advocate at Okta. Classic VWs Enthusiast. Henri Tremblay Java Champion, Montréal JUG & Devoxx4kids Québec leader, EasyMock and Objenesis lead developer, conference speaker Cay Horstmann Java Champion, author of “Core Java” David Heffelfinger Java Champion, Apache NetBeans Committer, Technical Author, Jakarta EE Consultant and Instructor. Josh Juneau Java Champion, Apache NetBeans Committer, Jakarta EE Mojarra Committer, Technical Author, Podcaster Jonathan Giles Java Champion, Dukes Choice Award winner, Microsoft Cloud Developer Advocate, Co-founder Gluon Ben Evans Java Champion, former JCP EC Member, co-founder jClarity, author of “Java in a Nutshell” & “Optimizing Java” Johan Vos Java Champion, Oracle Developer Champion, Gluon co-founder Thor Henning hetland Java Champion, Principal at Capra Consulting. Community leader Cantara, javaBin, JavaZone, Oslo Software Architecture and more.. Simone Bordet Java Champion, JUG Torino co-leader, Jetty team member Holly Cummins Java Champion, Author of Enterprise OSGi in Action Daniel Bryant Java Champion, co-author of Continuous Delivery in Java, and leader within the LJC Mohamed Taman Java Champion, Oracle Developer Champions, JCP member, EGJUG leader, Sr. Enterprise Architect / Sr. Software Engineer @WebCentric Belgrade, Serbia. International speaker, Books Author of “JavaFX essentials”, “Getting started with clean code, Java SE 9”, and “Hands-On Java 10 Programming with JShell”. Won Duke’s choice 2015, 2014 awards, & JCP outstanding adopt- a-jar participant 2013 awards Simon Maple Java Champion, Oracle Developer Champion, Virtual JUG leader, Director of Developer Relations, Snyk. Oliver Gierke Java Champion, Spring Data Project Lead at Pivotal Software, Inc. Jean-Michel Doudoux Java Champion, author of “Développons en Java” Michael Kölling Java Champion, Creator of BlueJ and Greenfoot, author of ‘Objects First with Java’. Mert Çalışkan Java Champion, Director of OpsGenie Academy, Published Author, Speaker Leonardo M R Lima Java Champion, JSR Spec Lead Cesar Hernandez Java Champion, Senior Software Engineer at Tomitribe, Eclipse Foundation Committer, Guatemala Java User Group member, Speaker and board member of Latin America Virtual JUG JEspañol. Rustam Mehmandarov Java Champion, Chief Engineer, Leader of JavaZone, board member and former leader of javaBin—Norwegian Java User Group. Paul Bakker Java Champion, Senior Software Engineer at Netflix Geir Magnusson Jr Java Champion, Member Apache Software Foundation, CTO at fuboTV Jorge Vargas Java Champion, JUG Leader JavaUP—Mexico—Speaker and member of JUG JEspañol. Bruno Souza Java Champion, JUG Leader of SouJava Ian F. Darwin Java Champion, Developer, Author, Trainer
  17. Clarification Alternatives JDK Updates openjdk.java.net/projects/jdk-updates Red Hat’s backporting of fixes

    access.redhat.com/articles/1299013 ”A major version of OpenJDK is supported for at minimum a period of six years from the time it is first introduced by Red Hat.”
  18. Clarification Alternatives AdoptOpenJDK project adoptopenjdk.net Azul’s Zulu’s cheaper support, LTS

    + MTS azul.com/products/zulu-enterprise Amazon Corretto https://aws.amazon.com/corretto/ … and probably a few other options
  19. JDK Housekeeping It’s about time! NOTHING has been removed in

    over 20 years Deprecated APIs JDK 9: 6 methods, 1 class JDK 10: 1 package, 6 classes, 9 methods, 1 field Command line flags JDK 9: 187 “-XX” flags JDK 10: 36 “-XX” flags
  20. JDK Housekeeping It’s about time! JDK11 Applets, Browser Plugin, Webstart,

    JavaFX java.se.ee, java.corba java.transaction, java.activation java.xml.bind, java.xml.ws, java.xml.ws.annotation Nashorn (deprecated)
  21. 102: Process API Updates 110: HTTP 2 Client 143: Improve

    Contended Locking 158: Unified JVM Logging 165: Compiler Control 193: Variable Handles 197: Segmented Code Cache 199: Smart Java Compilation, Phase Two 200: The Modular JDK 201: Modular Source Code 211: Elide Deprecation Warnings on Import Statements 212: Resolve Lint and Doclint Warnings 213: Milling Project Coin 214: Remove GC Combinations Deprecated in JDK 8 215: Tiered Attribution for javac 216: Process Import Statements Correctly 217: Annotations Pipeline 2.0 219: Datagram Transport Layer Security (DTLS) 220: Modular Run-Time Images 221: Simplified Doclet API 222: jshell: The Java Shell (Read-Eval-Print Loop) 223: New Version-String Scheme 224: HTML5 Javadoc 225: Javadoc Search 226: UTF-8 Property Files 227: Unicode 7.0 228: Add More Diagnostic Commands 229: Create PKCS12 Keystores by Default 231: Remove Launch-Time JRE Version Selection 232: Improve Secure Application Performance 233: Generate Run-Time Compiler Tests Automatically 235: Test Class-File Attributes Generated by javac 236: Parser API for Nashorn 237: Linux/AArch64 Port 238: Multi-Release JAR Files 240: Remove the JVM TI hprof Agent 241: Remove the jhat Tool 243: Java-Level JVM Compiler Interface 244: TLS Application-Layer Protocol Negotiation Extension 245: Validate JVM Command-Line Flag Arguments 246: Leverage CPU Instructions for GHASH and RSA 247: Compile for Older Platform Versions 248: Make G1 the Default Garbage Collector 249: OCSP Stapling for TLS 250: Store Interned Strings in CDS Archives 251: Multi-Resolution Images 252: Use CLDR Locale Data by Default 253: Prepare JavaFX UI Controls & CSS APIs for Modularization 254: Compact Strings 255: Merge Selected Xerces 2.11.0 Updates into JAXP 256: BeanInfo Annotations 257: Update JavaFX/Media to Newer Version of GStreamer 258: HarfBuzz Font-Layout Engine 259: Stack-Walking API 260: Encapsulate Most Internal APIs 261: Module System 262: TIFF Image I/O 263: HiDPI Graphics on Windows and Linux 264: Platform Logging API and Service 265: Marlin Graphics Renderer 266: More Concurrency Updates 267: Unicode 8.0 268: XML Catalogs 269: Convenience Factory Methods for Collections 270: Reserved Stack Areas for Critical Sections 271: Unified GC Logging 272: Platform-Specific Desktop Features 273: DRBG-Based SecureRandom Implementations 274: Enhanced Method Handles 275: Modular Java Application Packaging 276: Dynamic Linking of Language-Defined Object Models 277: Enhanced Deprecation 278: Additional Tests for Humongous Objects in G1 279: Improve Test-Failure Troubleshooting 280: Indify String Concatenation 281: HotSpot C++ Unit-Test Framework 282: jlink: The Java Linker 283: Enable GTK 3 on Linux 284: New HotSpot Build System 285: Spin-Wait Hints 287: SHA-3 Hash Algorithms 288: Disable SHA-1 Certificates 289: Deprecate the Applet API 290: Filter Incoming Serialization Data 291: Deprecate the Concurrent Mark Sweep (CMS) Garbage Collector 292: Implement Selected ECMAScript 6 Features in Nashorn 294: Linux/s390x Port 295: Ahead-of-Time Compilation 297: Unified arm32/arm64 Port 298: Remove Demos and Samples 299: Reorganize Documentation
  22. JDK 9 Modularity with Project Jigsaw Core java libraries rt.jar

    → now 75 OpenJDK modules (27 Java SE, 48 JDK) You can now minimize your runtime: java linker → hundreds of MBs to ~10 MBs Internal APIs encapsulated
  23. JDK 9 Other notable JEPs JEP 269 – Factory Methods

    for Collections Stream enhancements JEP 238 – Multi-Release Jar Files JEP 222 – jshell (REPL) JEP 266 – Concurrency Update JEP 277 – Enhanced Deprecation JEP 248 – Default Collector: G1
  24. JDK 10 Some JEPs JEP 286 - Local variable type

    inference - promoted in Lombok 2.0.0, follows JEP - var a reserved type, not a reserved keyword JEP 307 - Parallel Full GC for G1 JEP 310 - Application Class-Data Sharing (previously an Oracle commercial feature)
  25. JDK 10 Some JEPs JEP 317 - Experimental Java-based JIT

    compiler JEP 319 - Root certificates (housekeeping between JDK brandings) JEP 298 - Consolidate JDK into Single Repo JEP 304 - Garbage Collector Interface (Red Hat) JEP 312 - Thread-local Handshake
  26. JDK 10 Some JEPs Over 70 new APIs Helpers for

    immutable collections: List, Set, Map.copyOf(collection) Collectors.toUnmodifiableXYZ JVM now more docker-container aware, uses container CPU count and memory size
  27. JDK 11 Some JEPs 17 JEPs, 3 from outside Oracle:

    Red Hat, Google JEP 309 - Dynamic Class-File Constants Like a “final” (you can set the value once, but you can’t change it) → low-level JVM thing JEP 318 – Epsilon GC Collects no garbage Useful for: GC algorithm testing, mem-pressure testing, short-lived latency sensitive tasks
  28. JDK 11 Some JEPs JEP 321 - Support HTTP/2 -

    promoted from incubator module JEP 323 - Extend Local-Variable Syntax - using var in lambda parameters, handy if you must annotate the parameter JEP 327 - Unicode 10 Support - over 8000 new characters: bitcoin, Nishu, Soyombo and Zanabazar Square…
  29. JDK 11 Some JEPs JEP 330 – Launch Single File

    Source Code java MyUtil.java param1 param2… or even: Single File Source Code Shebang #!$JAVA_HOME/bin/java --source 11 Other JEPs: Cryptographic Algorithms, TLS 1.3, deprecate Nashorn, new APIs (I/O, Optional, Character, String…) Predicate not(Predicate p)
  30. Long Term Projects Amber An umbrella project for language and

    syntax improvements Lambda leftovers: underscore for unused parameters Raw String literals (backquote)
  31. Long Term Projects Amber JEP 305 – Pattern matching (switch

    on type, switch expression) https://cr.openjdk.java.net/~briangoetz/amber/pattern-match.html String formatted = switch (obj) { case Integer i -> String.format("int %d", i); case Byte b -> String.format("byte %d", b); case Long l -> String.format("long %d", l); case Double d -> String.format("double %f", d); case String s -> String.format("String %s, s); default -> String.format("Object %s", obj); };
  32. Long Term Projects Amber JEP 305 – Pattern matching (switch

    on type, switch expression) https://cr.openjdk.java.net/~briangoetz/amber/pattern-match.html int eval(Node n) { return switch(n) { case IntNode(var i) -> i; case NegNode(var n) -> -eval(n); case AddNode(var left, var right) -> eval(left) + eval(right); case MulNode(var left, var right) -> eval(left) * eval(right); }; }
  33. Long Term Projects Valhalla Value Types and Specialized Generics “Codes

    like a class, works like a primitive” Immutable
  34. Long Term Projects Loom Easy-to-use, high-throughput lightweight concurrency and new

    programming models on the Java platform, based on: - Fibres (lightweight user-mode threads, close to zero-overhead for context-switching) - Delimited continuations - Tail-call elimination
  35. Long Term Projects Metropolis Rewrite most of the JVM in

    java Based on the Graal Compiler Project
  36. Long Term Projects Panama Replacement for JNI - was hard-to-use,

    error-prone, hard for the compiler to optimize) Rethinking the interaction with native code: - language-neutral metadata - glue happens at runtime - that metadata can even be generated
  37. Release Cadence To board the train (or not)? JDK11 -

    2018.09 – LTS JDK12 - 2019.03 JDK13 - 2019.09 JDK14 - 2020.03 JDK15 - 2020.09 JDK16 - 2021.03 JDK17 - 2021.09 – LTS JDK18 - 2022.03 JDK19 - 2022.09 JDK20 - 2023.03 JDK21 - 2023.09 JDK22 - 2024.03 JDK23 - 2024.09 - LTS
  38. What JDK build? Well, you know me, so… …it depends!

    - on who is hosting your production, - on who is paying for support.