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.
ook @hendrikEbbers Wolfgang Weigend • Wolfgang Weigend • Master Principal Solution Engineer • Global Java Team • Java Technology & GraalVM Architecture
ook @hendrikEbbers Hendrik Ebbers • Karakun Co-Founder • Founder of JUG Dortmund • JSR EG member • JavaOne Rockstar, Java Champion • AdoptOpenJDK / Adoptium TSC member
ook @hendrikEbbers The wild 90th • "Oak" (Object Application Kernel) / "The Green Project" was developed in 1992 • This project evolved to Java in 1995 • The Duke was already the mascot for the Green Project
ook @hendrikEbbers The fi rst Java years • Java versions 1 till 6 were released at SUN • Java 1 was released 1996 • Java 6 was released 2006 • In 1998 the JCP (Java Community Process) was formed
ook @hendrikEbbers The takeover • In 2009 SUN was bought by Oracle • The Java community was really afraid about this move • Mostly no-one associated Oracle with open source
ook @hendrikEbbers Not your daddies Java • Functional programming FTW • Lambdas & Streams everywhere • Modularization of the JDK • Modularization of libs & apps • Keep up with the languages Dad Duke 2005
ook @hendrikEbbers The last years • Oracle managed to provide major updates of Java • Continued to evolve Java by the JCP • Not everything is perfect but much better than it was expected
ook @hendrikEbbers Java History Milestones Java initiated as research project at Sun Java powers the web; bundled with the Netscape browser Java becomes #1 programming language for enterprise applications Sun open sources Java 1991 1995 1999 2006 Java 7 – extending JVM to dynamic programming languages Java 9 – modular Java Java 14 and Java 15 2011 2017 2020 Oracle acquires Sun 2009 Java 10 – start of predictable release cadence 2018
ook @hendrikEbbers The JVM • The "heart" of the Java platform • De fi nition of Java language features • De fi nition of Java runtime • Since 2000 just-in-time-compilation (HotSpot)
ook @hendrikEbbers The standard APIs • Java Class Library (JCL) is a set of dynamically loadable libraries • Will be called at runtime • Almost entirely written in Java (some JNI calls to hardware & OS)
ook @hendrikEbbers The standard APIs • Since Java 9 the standard APIs are separated in several modules java.se java.sql.rowset java.sql java.xml java.base java.logging java.instrument java.datatransfer java.scripting java.prefs java.desktop java.xml.crypto java.compiler java.rmi java.naming java.security.sasl java.management java.security.jgss
ook @hendrikEbbers The (evil) private APIs • Java contains some private Java APIs • This APIs should not be used in framework / application code • Private APIs can be changed at anytime
ook @hendrikEbbers The (evil) private APIs • Some rules about private APIs • Do not use anything besides the java.* package • Swing and Graphics2D is located in the javax.* package • JavaFX is located in the javafx.* package
ook @hendrikEbbers The (evil) private APIs • JDK 9 till JDK 15 defaults to --illegal-access=warn • JDK 16 defaults to --illegal-access=deny • JDK 17 disables permit, warn & debug values for illegal- access option • It is still possible to use --add-opens or the Add-Opens manifest attribute
ook @hendrikEbbers The tools • Basic tools like the java or javac command are part of each JDK distribution • Oracle added several tools to its Java distribution that are not part of OpenJDK • All this tools were developed closed source at Oracle
ook @hendrikEbbers The tools • A good example is "Java WebStart" • WebStart was never part of OpenJDK and therefore was never part of OpenJDK builds • WebStart was only delivered with Oracle JDK builds
ook @hendrikEbbers Oracle JDK & OpenJDK OpenJDK 8 JVM, tools, etc. JVM, tools, etc. Exclusive Oracle stu f eg. Flight recorder WebStart Mission Control Oracle JDK 8
ook @hendrikEbbers Oracle JDK & OpenJDK • Oracle wants to have the content of Oracle JDK (more or less) be equal to OpenJDK • Therefore Oracle contributed some of the previews content of Oracle JDK to OpenJDK • Tools like Flight Recorder were open sourced
ook @hendrikEbbers OpenJDK • Java has been open sourced in 2006 • SUN derived OpenJDK from SunJDK as a vendor JDK • Oracle JDK is derived from OpenJDK • Oracle took over the work at OpenJDK and many companies followed...
ook @hendrikEbbers Contribution to OpenJDK • Since OpenJDK is an open source project everybody can contribute • Both individuals and companies contribute to OpenJDK • Oracle still does over 75% of all contributions for the OpenJDK
ook @hendrikEbbers Contribution to OpenJDK • Happily more and more people of the Java community contribute to OpenJDK • Sadly Good tutorials and 'Getting started' guides are missing We are working on that issue
ook @hendrikEbbers Oracle Contributor Agreement • The following organizations and individuals have signed the OpenJDK Community TCK Agreement (OCTLA) and been granted access to the JCK * * * TCK - Test Compatibility Kit JCK - Java Compatibility Kit
ook @hendrikEbbers OpenJDK and Java Ownership • Java is a registered trademark of Oracle • OpenJDK is named independently • Access to the TCK is restricted • TCK access requires to sign the OCTLA
ook @hendrikEbbers OpenJDK and Java Ownership • 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
ook @hendrikEbbers The classical Java releases • Up until Java 8 we had a fl exible release train for Java • A new major version was released "when it's done" • This ended in delays and a a big bundle of new features per release
ook @hendrikEbbers The classical Java releases • A version was available for several years • Normally a version received updates even after the next version was released • Commercial LTS support was provided by Oracle for legacy projects
ook @hendrikEbbers The new release train • Beginning with Java 9 Oracle announced the new release train • More fl exible with fi xed release dates • A feature will be released "when it's done" • Shorter lifetime of Java versions
ook @hendrikEbbers The new release train Java 9 Java 10 Java 11 Java 12 Java 13 Java 14 2018 2019 2020 Java 8 free version commercial version Some vendors provide LTS for production only by support subscription
ook @hendrikEbbers The new release train (Oracle) • Starting with Java 11 Oracle provides 2 Java builds • Oracle JDK is the commercial distribution • Oracle OpenJDK builds still provided under GPL with classpath exception
ook @hendrikEbbers The new release train • At the end the OpenJDK only de fi nes the major releases • Every vendor can provide distributions, LTS and support based on individual needs • Azul for example provides Medium-Term-Support (MTS) for some versions like Java 13 or 15
ook @hendrikEbbers The new release train • Next to the new timeline the new release model added some additional points • Deprecated code was removed from Java • @Deprecated has additional information
ook @hendrikEbbers The new release train A value of true indicates intent to remove the annotated program element in a future version. @Deprecated(forRemoval = true)
ook @hendrikEbbers The new release train • Since Java will become more fl exible the users of Java need to become more fl exible, too • Based on the changes dependencies and application code need to be checked for a new version • Updates should be done more often
ook @hendrikEbbers Security issues • The main reason for updates are security updates • Java contains security vulnerabilities • Several exploitable security issues are fi xed each year
ook @hendrikEbbers Security issues • About 100 exploitable security issues were fi xed in 2018 Jul 2018 Oct 2017 Jan 2018 Apr 2018 40 20 60 Okt 2018 Exploit not published Exploit is available
ook @hendrikEbbers Security issues • The main reason for updates are security updates • Java contains security vulnerabilities • Several exploitable security issues are fi xed each year More Information: https://bit.ly/2XfI0c4
ook @hendrikEbbers Commercial support • Several companies offer commercial support for Java • Normally this contains LTS versions of speci fi c Java versions • All companies share [more or less] the same work fl ow
ook @hendrikEbbers OpenJDK Work fl ow • Let's have a look how such issues are fi xed in Java • Since the OpenJDK is the open source repository of Java the issues will normally be fi xed here
ook @hendrikEbbers Temurin by Adoptium • Eclipse Adoptium is the successor of AdoptOpenJDK • Eclipse Adoptium provides an OpenJDK distribution • That distribution is called Temurin
ook @hendrikEbbers Why not 'Eclipse AdoptOpenJDK' ? • The answer is quite simple: • The Eclipse Foundation trademarks all names and 'AdoptOpenJDK' is just not trademark able OpenJDK Java ™ ™
ook @hendrikEbbers Just call the distro 'Adoptium' ... • NO! Adoptium is much more than 'just the binaries': AQAVIT is the quality and runtime branding evaluation project for Java SE runtimes and associated technology. Any Java runtime Open source AQAVIT test & benchmark suite Enterprise ready runtime https://bit.ly/3nnLVi7 More Info:
ook @hendrikEbbers Just call the distro 'Adoptium' ... • NO! Adoptium is much more than 'just the binaries': We want to create a good landing page for OpenJDK and Java Newcomer
ook @hendrikEbbers Just call the distro 'Adoptium' ... • NO! We want to be convenient: Like ___________ provides ___________ the Adoptium project provides Temurin Azul Systems Zulu Amazon Coretto Bellsoft Liberica Oracle Oracle JDK
ook @hendrikEbbers Other distributions • Several companies provide OpenJDK based distributions based on different reasons: • Some wants to sell LTS support • Some wants to provide it bundled with products • Some wants to use it in the company cloud • ...
ook @hendrikEbbers Other distributions • It is really hard to choose a distribution... • Adoptium tries to help the user by providing a marketplace • The Adoptium marketplace will only contain distributions that are TCK and AQAvit approved
ook @hendrikEbbers JDK Features • All features of new Java releases are de fi ned by JDK Enhancement Proposals (JEP) of the OpenJDK • De fi nitions of JEPs and the feature lists of a Java release can be found at the OpenJDK • JEP URL: https://openjdk.java.net/jeps/395 • Release URL: https://openjdk.java.net/projects/jdk/16/
ook @hendrikEbbers JEP De fi nitions • The JEP de fi nition and work fl ow is de fi ned by JEPs: • JEP 0 contains an up-to-date index of all JEPs • JEP 1 & JEP 2 de fi nes the content and work fl ows of JEPs • JEP 3 de fi nes the release process of the JDK
ook @hendrikEbbers JEP De fi nitions • A Java release can contain JEPs as previews or in incubator mode: • JEP 11 de fi nes incubator mode • JEP 12 de fi nes preview mode
ook @hendrikEbbers Preview Features $ javac HelloWorld.java $ javac --release 14 --enable-preview HelloWorld.java $ java --enable-preview HelloWorld Enable all preview features of JDK 14 Run with all preview features of JDK 14
ook @hendrikEbbers Helpful NullPointerExceptions Exception in thread "main" java.lang.NullPointerException: Cannot assign field "i" because "a" is null at Prog.main(Prog.java:5) Exception in thread "main" java.lang.NullPointerException: Cannot read field "c" because "a.b" is null at Prog.main(Prog.java:5) •
ook @hendrikEbbers Vector API a = b + c * z[i+0] a b c z[i+0] d = e + f * z[i+1] d e f z[i+1] r = s + t * z[i+2] r s t z[i+2] u = v + w * z[i+3] u v w z[i+3] Old approach With Vector API = + SIMD * SIMD four multiplications four additions four assignments One SIMD multiplications One SIMD additions One assignments * * SIMD = Single Instruction Multiple Data *
ook @hendrikEbbers New macOS Rendering Pipeline • Implement a Java 2D internal rendering pipeline for macOS using the Apple Metal API • Alternative to the existing pipeline, which uses the deprecated Apple OpenGL API Apple deprecated the OpenGL rendering library in September 2018
ook @hendrikEbbers macOS/AArch64 Port • Apple has announced a long-term plan to transition their line of Macintosh computers from x64 to AArch64 (ARM) • Native support added to OpenJDK Apple M1 chip for example No Rosetta 2 usage anymore
ook @hendrikEbbers OpenJDK at Git • JavaFX was the fi rst project of the OpenJDK that has been migrated to git & GitHub • With project Skara the OpenJDK is moved to git & GitHub https://github.com/openjdk/jfx
ook @hendrikEbbers OpenJDK at Git • Since OpenJDK projects are now hosted at GitHub contribution is super easy • Every GitHub user can create a PR (+ some paperwork to have you checked as a valid OpenJDK commiter)
ook @hendrikEbbers All OS Builds with GitHub Actions • OpenJDK projects already use GitHub Actions for CI tasks • Automatically build and test JavaFX on all 3 big operation systems for each pull request https://github.com/openjdk/jfx/pull/619/checks
ook @hendrikEbbers Issue tracker is still untouched • The Java issue tracker has not changed with project Skara • OpenJDK Bug Tracker is still Jira based on not directly writeable by endusers
ook @hendrikEbbers Issue tracker is still untouched • Oracle provides hard to handle solution • If you want to follow me (Hendrik) down the rabbit hole: https://bit.ly/3nnJdsX
ook @hendrikEbbers Migrating to JDK 17 • Oracle provides a migration guide: • Signi fi cant Changes in the JDK • Preparing For Migration • Migrating From JDK 8 to Later JDK Releases https://docs.oracle.com/en/java/javase/17/migrate/index.html https://bit.ly/3k224YD
ook @hendrikEbbers Migrating to JDK 17 • Download JDK 17 • Run your program before recompiling • Update 3rd-party libraries • Compile your application if needed • Run jdeps on your code
ook @hendrikEbbers Check removed APIs • The Java Version Almanac contains all information that you need • Open source service by Mark Hoffmann • Support any 2 releases https://javaalmanac.io/jdk/17/apidiff/11/ https://bit.ly/3z2Bqmv
ook @hendrikEbbers Deprecated for Removal in 17 • Applet API (JEP 398) • No Web browser supports Applets anymore • Security Manager (JEP 411) • Was used extensively for running applets in a sandbox • Not been the primary means of securing client-side Java code for many years • Rarely been used to secure server-side Java code
ook @hendrikEbbers Removed in JDK 17 • RMI Activation (JEP 407) • Deprecated for removal since JDK 15 • Experimental AOT and JIT Compiler (JEP 410) • AOT was an experimental feature shipped introduced with JDK 9 • GraalVM JIT Compiler was an experimental feature introduced with JDK 10 • Was not included with JDK 16
ook @hendrikEbbers JavaFX Migration • JavaFX was part of Java 8 binaries by several vendors like Oracle or Azul • For Java 11 the best practice is to handle JavaFX like any other dependency • Good tutorials for Maven & Gradle can be found at https://openjfx.io/openjfx-docs/ https://bit.ly/2XdV41D
ook @hendrikEbbers Check for usage of private API • We can't say that often enough • Check your code for any usage • Many online resources for individual issues ... or consultancy
ook @hendrikEbbers Migrating to a different Vendor • Maybe you want to migrate to a different OpenJDK based distribution • Since all are based on OpenJDK and mostly all are TCK checked a switch should be super easy... you do Have a support subscription for Java versions in production ? As you can imagine there are exceptions...
ook @hendrikEbbers Migrating to a different Vendor • There are still some minor differences distributions • As an example Oracle JDK uses a different font in Swing than the OpenJDK does • Adoptium provides an migration guide: https://adoptium.net/migration.html https://bit.ly/3tBroI1
ook @hendrikEbbers Additional resources • You can fi nd many good resources online • ... sadly not all are 100% correct • Good starting points: https://docs.microsoft.com/en-us/java/openjdk/transition-from-java-8-to-java-11 https://bit.ly/3tBroI1 https://nipafx.dev/java-11-migration-guide/ https://bit.ly/3C3aTY9
ook @hendrikEbbers GraalVM GraalVM Community is available for free for any use. It is built from the GraalVM sources available on GitHub. We provide pre-built binaries for Linux/ X86, Linux/ARM, macOS, and Windows platforms on x86 64-bit systems. Support for the Windows and Linux/ARM platforms, and the Python, Ruby and R languages is experimental. Note GraalVM Community Edition contains significant technology from other projects including OpenJDK and Node.js which are not maintained by the GraalVM community. GraalVM Enterprise Edition is recommended for production applications. GraalVM Enterprise provides additional performance, security, and scalability relevant for running applications in production. You can get a version of GraalVM Enterprise that is free for evaluation and developing new applications via the Oracle Technology Network (OTN), or a commercially licensed version for production use via the Oracle Store. We provide binaries for Linux, macOS, and Windows platforms on x86 64-bit systems. Support for the Windows and Linux/ARM platforms, and the Python, Ruby and R languages is experimental. Enterprise Edition Community Edition
ook @hendrikEbbers GraalVM • Unlike OpenJDK the GraalVM is a full Oracle product • BUT: GraalVM is open source • BUT: GraalVM community edition is available • BUT: Advisory Board contains multiple companies https://www.graalvm.org/community/advisory-board/