SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
An inventory of
the Java ecosystem
What do I want to accomplish with this talk?
Software consultant at day,
open source developer at night.
What is Java anyways?
JLS JVMSJava Language Specification Java Virtual Machine Specification
51 character sequences, formed from ASCII
letters, are reserved for use as keywords
and cannot be used as identifiers (§3.8).
Class and interface names that appear in class file structures
are always represented in a fully qualified form known as
binary names (JLS §13.1). Such names are always represented
as CONSTANT_Utf8_info structures (§4.4.7) and thus may be
drawn, where not further constrained, from the entire Unicode
codespace.
Language Preview Specifications
+
One specification per major release, no changes in update releases: https://docs.oracle.com/javase/specs/
1. Introduction 11. Exceptions
2. Grammar 12. Execution
3. Lexical structure 13. Binary compatibility
4. Types, values, variables 14. Blocks, statements
5. Conversions, contexts 15. Expressions
6. Names 16. Definite assignment
7. Packages, modules 17. Threads, locks
8. Classes 18. Type inference
9. Interfaces 19. Syntax
10. Arrays
1. Introduction
2. JVM structure
3. Compilation
4. Class file format
5. Loading, linking,
initialization
6. JVM instruction set
7. Opcode mnemonics
JEPJava Enhancement Proposal
JSRJava Specification Request
Java Language Specification
Java Virtual Machine Specification
JCKJava Compatibility Kit
TCKsSpecification Test Kits
The Java Community Process (JCP).
Java Servlet Specification
Java Message Specification
Java RESTful Web Services (JAX-RS)
...
ECExecutive Committee
2020: Alibaba, ARM, Azul, BNY Mellon, Credit Suisse, Eclipse Foundation, Fujitsu,
Goldman Sachs, JetBrains, Hazelcast, Hewlett Packard, IBM, Intel, London Java
Community, MicroDoc, Oracle, SAP, Software AG, SouJava, Tomitribe, Twitter, V2COM
OpenJDK Community TCK and EA TCK
License Agreement (OCTLA)
spec lead and expert group
Jakarta Servlet Specification
Jakarta Message Specification
Jakarta RESTful Web Services (JAX-RS)
...
Jakarta EE Working Group
Jakarta EE Steering Committee
The Java Community Process (JCP) by example: The Java platform module system (JPMS)
JEP
JEP 261: Module system
JEP 200: The Modular JDK
JEP 201: Modular Source Code
JEP 220: Modular
Runtime Images
JEP 162: Prepare
for Modularization
JEP 179: Document JDK
API Support and Stability
JEP 281: jlink – The Java Linker
JEP 275: Modular Java
Application Packaging
JEP 260: Encapsulate Most
Internal APIs
JSR
RI
JSR 376: Java Platform
Module System
Maling lists:
jpms-spec-experts
jpms-spec-observers
jpms-spec-comments
Voting process:
12.2014 JSR Review
11.2015 JSR Renewal
04.2017 Review
06.2017 Review Reconsideration
08.2017 Final Approval
OpenJDK
OpenJDK project: Jigsaw
Maling lists:
jigsaw-dev
Project sponsor:
Compiler Group
EA build: jdk.java.net
Specification diffs:
JLS, JVMTS, JAR, JNI,
JVMTI, JDWP
Specification versus implementation
Many ways to implement a Java virtual machine specification compliant. This is more obvious for Java EE where
different application containers are explicitly branded as such.
Sun HotSpot Appeal VM JRockit Apache Harmony
Java compatibility kit (JCK) - not open-sourced
JVMS? JVMS? JVMS?
GPL + CP exception commercial Apache license
public static void main(String[] args) {
System.out.println("Hello world!");
}
OCTLA: free if made available
under the GPL, no change within
namespace, heavily OpenJDK-
derived, Oracle-approved
OpenJDK: a project to implement a reference of the specification for common use
jdk jdk*u
hg.openjdk.java.net
mirror.vendor.com
jdk.java.net
(Java 14 EA)
adoptopenjdk.net
(Java 8 - 13)
OpenJDK Vulnerability
Group (OJVG)
aws.amazon.com/corretto
azul.com
bell-sw.com
developers.redhat.com/products/openjdk
sap.github.io/SapMachine
oracle.com/technetwork/java/javase
Oracle contributor agreement (OCA):
shared copyright with Oracle
jdk.java.net
(Java 13, 6 months)
The OpenJDK project: governance model.
Group
Project
Participant
Contributor
OpenJDK
Member
OpenJDK Lead
JDK Release
Project
Group Lead
Group MemberAuthor
Committer
Reviewer
Project Lead Chair
2x At-Large
Member
Vice-Chair
x Observer
openjdk.java.net/census
The OpenJDK project: proposing and applying a patch.
Request for
Enhancement (RFE)
Request for
Comments (RFC)
Request for Review
(RFR)
patch
hg diff (inline)
webrev
Sponsor
jtreg JCK
Merge
Compatibility and
Specification
Review (CSR)
Backport
1. Remember tooling. 4. Remember JVMTI
2. Remember JNI 5. Remember JPDA.
3. Remember reflection API. 6. Remember serialization.
The OpenJDK project: backporting and update projects.
hg.openjdk.java.net
jdk/jdk
jdk-updates/jdk13u
jdk/jdk13
jdk-updates/jdk12u
jdk/jdk12
jdk-updates/jdk11u
jdk/jdk11
jdk-updates/jdk11u-dev jdk-updates/jdk10u
jdk/jdk10
jdk10/jdk10
jdk-updates/jdk9u
jdk9/jdk9
jdk8/jdk8u
jdk8/jdk8
jdk8/jdk8u-dev
jdk7/jdk7u
jdk7/jdk7
jdk7/jdk7u-dev
jdk6/jdk6
September 2018
The OpenJDK project: clone, build and test DIY.
sudo apt install mercurial
./build/linux-x86_64-server-release/jdk/bin/java --fullversion
hg clone https://hg.openjdk.java.net/jdk/jdk
cd jdk
sudo apt install build-essential
bash configure --with-boot-jdk=~/jdk-13
make images
hg clone https://hg.openjdk.java.net/code-tools/jtreg
sh jtreg/make/build-all.sh ~/jdk-8
bash configure --with-boot-jdk=~/jdk-13 --disable-warnings-as-errors
openjdk full version "14-internal+0-adhoc.rafael.jdk"
export JT_HOME=~/jtreg/build/images/jtreg
bash configure --with-boot-jdk=~/jdk-13 --disable-warnings-as-errors
make test-tier1
In what way do OpenJDK builds differ?
jdk jdk*u
hg.openjdk.java.net
hotspot
java.base
jdk.compiler
jdk jdk*u
OpenJ9
openj9
java.base
jdk.compiler
jdk jdk*u
Azul Zing
hotspot
java.base
jdk.compiler
hotspot/gc/c4
hotspot/jit/falcon
hotspot/readynow
JDK JRE-compact1 JRE (with JavaFX)JRE
multiple binaries
possible
What are the more common OpenJDK distributions?
ZULUZING
Oracle OpenJDK
Other VMs that offer subset functionality.
DAVLIK ART
CE EE Substrate
Does not support all standard APIs,
e.g. java.awt, java.swing, java.beans,
java.instrumentation.
Does not support Java byte code at
runtime (Dalvik: dex format, ART: native).
JCK-approved VM unless compiled via
native-image extension (Substrate VM):
- Requires setup to use reflection.
- JVMTI and security manager not supported.
- Dynamic byte code not supported.
- Method handles and invokedynamic (unless via
lambda meta factory) not supported.
Name Runtime JIT GC Versions Platforms Free Support JCK
AdoptOpenJDK HotSpot C1/C2 G1, SR, PL, ZGC, SH* 8 - 13 Linux, Mac, Win Yes Yes No
AdoptOpenJDK OpenJ9 OpenJ9 Openj9 8 - 13 Linux, Mac, Win Yes Yes No
Oracle OpenJDK HotSpot C1/C2 G1, SR, PL, ZGC 13, 14-EA, EA Linux, Mac, Win* Yes No Yes
Oracle JDK HotSpot C1/C2 G1, SR, PL, ZGC 8, 11, 13 Linux, Mac, Win No Yes Yes
Azul Zing HotSpot C1/Falcon C4 8, 11 Linux No Yes Yes
Azul Zulu HotSpot C1/C2 G1, SR, PL, ZGC, SH* 6 - 13 Linux, Mac, Win Yes Yes Yes
Red Hat OpenJDK HotSpot C1/C2 G1, SR, PL, ZGC, SH 8, 11, 13 RHE Linux, Win Yes Yes Yes
SAP Machine HotSpot C1/C2 G1, SR, PL, ZGC, SH* 11, 13 Linux, Mac, Win Yes No Yes
Corretto HotSpot C1/C2 G1, SR, PL, ZGC 8, 11 Linux, Mac, Win Yes On AWS Yes
Liberica HotSpot C1/C2 G1, SR, PL, ZGC, SH* 8, 11, 13 Linux, Mac, Win Yes Yes Yes
Dragonwell HotSpot C1/C2 G1, SR, PL 8 Linux Yes No Yes
Pivotal Spring RT HotSpot C1/C2 G1, SR, PL 7 - 12 Linux Yes Yes No
Graal VM HotSpot C1/Graal G1, SR, PL 8 Linux, Mac, Win* Both Yes Yes
Substrate VM None Graal GenScavenge 8 Linux, Mac, Win* Both Yes No
Android ART ART ART 7 (subset 8) Android Yes No No
Debian HotSpot C1/C2 G1, SR, PL, ZGC, SH* 8 - 13 Linux Yes No No
Note: ZGC supported since Java 11. Deprecated CMS not mentioned. Shenandoah (SH) marked with a star available since Java 12. SR = serial, PL = parallel. Only subset of platforms.
Java is still free (dah!).
java -XX:+UnlockCommercialFeatures MyApp
java MyApp
Oracle OpenJDK
java -XX:+UnlockCommercialFeatures MyApp
java MyApp
java MyApp
Java 8u202 (January 2019)
Java 8u211 (April 2019)
java -XX:+UnlockCommercialFeatures MyApp
Java 8u40 (March 2015)
Java 13.0.1 (October 2019), updates until March 2020
Old versions: No license change!
Free unless commercial options are
enabled in production environments.
Release cadence: Oracle OpenJDK vs Oracle JDK.
Sep '17 Mar '18 Sep '18 Mar '19 Sep '19 Mar '20 Sep '20 Mar '21
Java 9 Java 10 Java 11 Java 12 Java 13 Java 14 Java 15
Java 8 (until March 2022, extended: March 2025)
Java 11 (until March 2023, extended March 2026)
Java 8
Java 12 Java 13 Java 14 Java 15
Release cadence: Red Hat OpenJDK and others.
Sep '17 Mar '18 Sep '18 Mar '19 Sep '19 Mar '20 Sep '20 Mar '21
Java 8 (until June 2023)
Java 11 (until October 2024)
Java 8
Java 11
Java 7 (until June 2020)
Release cadence: Azul Zulu.
Sep '17 Mar '18 Sep '18 Mar '19 Sep '19 Mar '20 Sep '20 Mar '21
Java 6 (until December 2021)
Java 13 (March 2023)
Java 7 (until July 2023)
Java 8 (until March 2026)
Java 11 (until September 2027)
Java 15
(March 2023)
Java 6 (until 2019)
How involved are companies in the OpenJDK?
Sources: https://blogs.oracle.com/java-platform-group/building-jdk-11-together
https://blogs.oracle.com/java-platform-group/the-arrival-of-java-13
Software license families.
public domain permissive strong copyleft restrictive trade secret
2/3-clause BSD
MIT
Apache
4-clause BSD
GPL
LGPL
AGPL
BCL
GPL + CPE
dual
licensed
?
EPL
weak
copyleft
Adoption strategy: bleeding edge versus LTS.
Java 8
(bytecode 52)
Java 11
(bytecode 55)
module-info.class
encapsulation of reflective access
built-in class loader implementation change
platform class loader replaces extension mechanism
new URL schema for class file resources
new version string format
reduction of preconfigured modules
(in Java 9)
Java 13
(bytecode 57)
Enhanced deprecation
(since Java 10)
sun.misc.Unsafe::defineClass removed
(in Java 12)
Java 14-EA
(bytecode 58)
-net.bytebuddy.experimental=true
Java 14+X
(bytecode 58+X)
invokedynamic (Java 7)
nestmates (Java 11)
constantdynamic (Java 11)
java.bytecode.* (?)
Most changes are
performance
improvements or
feature extensions!
Update your libraries,
don't "hack" and you
should be fine.
Migrating from Java EE to Jakarta EE.
jakarta.servlet.*
jakarta.ws.rs.*
...
javax.servlet.*
javax.ws.rs.*
...
javax.sql.*
javax.management.*
...
public class LegacyServletBridge implements jakarta.servlet.Servlet {
private final javax.servlet.Servlet delegate;
public LegacyServlet(javax.servlet.Servlet delegate) {
this.delegate = delegate;
}
@Override public void service(jakarta.servlet.ServletRequest req,
jakarta.servlet.ServletResponse resp) {
delegate.service(new LegacyServletRequest(req),
new LegacyServletResponse(resp));
}
}
org.hibernate.validation.* javax.validation.*
The Java developer (advocacy) community.
developer
advocacy
developer
"recognition"
developer
awards
meetups and
developer
conferences
Project preview: Loom.
public class SampleServlet extends HttpServlet {
private final HttpClient client;
public SampleServlet(HttpClient client) {
this.client = client;
}
@Override
protected void doGet(
HttpServletRequest req,
HttpServletResponse resp) throws IOException, ServletException {
resp.getOutputStream().write(client.fetchResponse());
}
}
public class SampleServlet extends HttpServlet {
private final HttpClient client;
public SampleServlet(HttpClient client) {
this.client = client;
}
@Override
protected void doGet(
HttpServletRequest req,
HttpServletResponse resp) throws IOException, ServletException {
AsyncContext context = req.startAsync();
client.fetchResponseAsync().onComplete(response -> {
context.getResponse().getOutputStream().write(response);
context.complete();
});
}
}
run
doGet
fetchResponse
OS-backed-thread
doGet
fetchResponse
doGet
fetchResponse
suspend
runrun
jdk.java.net/loom
fibers/continuations
tail-call optimization
Project preview: Panama.
jdk.java.net/panama
foreign function interface
data layouts
jextract 
-t nvidia -L /usr/lib -lnvidia-ml 
--record-library-path 
/opt/cuda/targets/x86_64-linux/include/nvml.h 
-o nvidia.jar
import java.foreign.*;
import java.foreign.memory.*;
import java.lang.invoke.MethodHandles;
import nvidia.nvml_h;
import nvidia.nvml_lib;
public class Sample {
public static void main(String[] args) {
Libraries.loadLibrary(MethodHandles.lookup(), "nvidia-ml");
try(Scope s = nvml_lib.scope().fork()) {
nvml_lib.nvmlInit_v2();
}
}
}
Look into JNA for a currently
available solution without
direct JVM-support.
Project preview: Valhalla.
a
b
c
class NonPrimitiveSample {
Integer a, b, c;
}
Integer
42
class PrimitiveSample {
int a, b, c;
}
a = 42
b = 84
c = 1
object
object
Integer
84
object
object
Integer
1
object
object
new PrimitiveSample()
new NonPrimitiveSample()
jdk.java.net/valhalla
inline types
generic specialization
cache lines: stales processor
inline class
Project review and preview: Amber.
Collection of language extensions:
Local variable type inference (Java 10)
Switch expressions (Java 12, Java 13, preview)
Pattern matching for instanceof
Records
Enhanced enums (on hold)
var value = "Hello World!";
Function<String, String> f = (@NonNull var arg) -> arg;Function<String, String> f = arg -> arg;Function<String, String> f = (var arg) -> arg;
int result = switch (input) {
case "foo" -> 1;
case "bar" -> 2;
default -> 3;
}
int result;
switch (input) {
case "foo":
result = 1;
break;
case "bar":
result = 2;
break;
default:
result = 3;
}
"twonlinesn""""
two
lines
"""
Object o = fetch();
if (o instanceof String s) {
String result = s;
}
String text = String.format("%s: %d",
new Object[] {"foo", new Integer(42)});
String text = String.format("%s: %d", "foo", 42);
Local-variable syntax for lambda parameters (Java 11)
Text blocks (Java 13, preview)
Java Compiler intrinsics API
Sealed types
Lambda leftovers (on hold)
String text =
(invokedynamic) DynamicFormat::format,
"%s: %d", "foo", 42;
sealed interface Base permits Foo, Bar { }
record Foo(String bar) { }
Project overview: Graal.
java -XX:+UnlockExperimentalVMOptions 
-XX:+UseJVMCICompiler -Djvmci.Compiler=graal 
MyApp
jaotc -output MyApp.so MyApp.class
java -XX:AOTLibrary=./libMyApp.so MyApp
native-image -cp myapp.jar MyApp
interface JVMCICompiler {
CompilationRequestResult compileMethod(CompilationRequest request);
}
import org.graalvm.polyglot.Context;
class GraalJavaScript {
public static void main(String[] args) {
try (Context context = Context.newBuilder().allowNativeAccess(true).build()) {
System.out.println(context.eval("js", "14 + 2"));
}
}
}
http://rafael.codes
@rafaelcodes
http://documents4j.com
https://github.com/documents4j/documents4j
http://bytebuddy.net
https://github.com/raphw/byte-buddy

Contenu connexe

Tendances

A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVMRafael Winterhalter
 
Monitoring distributed (micro-)services
Monitoring distributed (micro-)servicesMonitoring distributed (micro-)services
Monitoring distributed (micro-)servicesRafael Winterhalter
 
Getting started with Java 9 modules
Getting started with Java 9 modulesGetting started with Java 9 modules
Getting started with Java 9 modulesRafael Winterhalter
 
Building a java tracer
Building a java tracerBuilding a java tracer
Building a java tracerrahulrevo
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoinknight1128
 
Java Bytecode For Discriminating Developers - GeeCON 2011
Java Bytecode For Discriminating Developers - GeeCON 2011Java Bytecode For Discriminating Developers - GeeCON 2011
Java Bytecode For Discriminating Developers - GeeCON 2011Anton Arhipov
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Anton Arhipov
 
An introduction to JVM performance
An introduction to JVM performanceAn introduction to JVM performance
An introduction to JVM performanceRafael Winterhalter
 
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...Christopher Frohoff
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?Doug Hawkins
 
Threads v3
Threads v3Threads v3
Threads v3Sunil OS
 
Intrinsic Methods in HotSpot VM
Intrinsic Methods in HotSpot VMIntrinsic Methods in HotSpot VM
Intrinsic Methods in HotSpot VMKris Mok
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
How Scala code is expressed in the JVM
How Scala code is expressed in the JVMHow Scala code is expressed in the JVM
How Scala code is expressed in the JVMKoichi Sakata
 

Tendances (20)

A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVM
 
Monitoring distributed (micro-)services
Monitoring distributed (micro-)servicesMonitoring distributed (micro-)services
Monitoring distributed (micro-)services
 
Java byte code in practice
Java byte code in practiceJava byte code in practice
Java byte code in practice
 
Getting started with Java 9 modules
Getting started with Java 9 modulesGetting started with Java 9 modules
Getting started with Java 9 modules
 
JVM
JVMJVM
JVM
 
Building a java tracer
Building a java tracerBuilding a java tracer
Building a java tracer
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
Java Bytecode For Discriminating Developers - GeeCON 2011
Java Bytecode For Discriminating Developers - GeeCON 2011Java Bytecode For Discriminating Developers - GeeCON 2011
Java Bytecode For Discriminating Developers - GeeCON 2011
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012
 
An introduction to JVM performance
An introduction to JVM performanceAn introduction to JVM performance
An introduction to JVM performance
 
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
 
NIO and NIO2
NIO and NIO2NIO and NIO2
NIO and NIO2
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
 
Unit testing concurrent code
Unit testing concurrent codeUnit testing concurrent code
Unit testing concurrent code
 
Threads v3
Threads v3Threads v3
Threads v3
 
02 basic java programming and operators
02 basic java programming and operators02 basic java programming and operators
02 basic java programming and operators
 
What`s new in Java 7
What`s new in Java 7What`s new in Java 7
What`s new in Java 7
 
Intrinsic Methods in HotSpot VM
Intrinsic Methods in HotSpot VMIntrinsic Methods in HotSpot VM
Intrinsic Methods in HotSpot VM
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
How Scala code is expressed in the JVM
How Scala code is expressed in the JVMHow Scala code is expressed in the JVM
How Scala code is expressed in the JVM
 

Similaire à Java and OpenJDK: disecting the ecosystem

Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overviewJong Soon Bok
 
Java 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaJava 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaManjula Kollipara
 
JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?JBossArchitectForum
 
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 youDmitry Buzdin
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Sandeep Rawat
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKJosé Paumard
 
Java EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureJava EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureArun Gupta
 
Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Abhishek Gupta
 
Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Abhishek Gupta
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Vadym Kazulkin
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Arun Gupta
 
The features of java 11 vs. java 12
The features of  java 11 vs. java 12The features of  java 11 vs. java 12
The features of java 11 vs. java 12FarjanaAhmed3
 

Similaire à Java and OpenJDK: disecting the ecosystem (20)

GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overview
 
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK.v1.0.20191009
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK.v1.0.20191009Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK.v1.0.20191009
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK.v1.0.20191009
 
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDKComparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
 
Tech Days 2010
Tech  Days 2010Tech  Days 2010
Tech Days 2010
 
Java 9 new features
Java 9 new featuresJava 9 new features
Java 9 new features
 
Java 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaJava 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kollipara
 
JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?
 
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
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
Java EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureJava EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the future
 
Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2
 
Introducing Java 7
Introducing Java 7Introducing Java 7
Introducing Java 7
 
Java 9 and Project Jigsaw
Java 9 and Project JigsawJava 9 and Project Jigsaw
Java 9 and Project Jigsaw
 
Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
The features of java 11 vs. java 12
The features of  java 11 vs. java 12The features of  java 11 vs. java 12
The features of java 11 vs. java 12
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 

Dernier

Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLAlluxio, Inc.
 
About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9Jürgen Gutsch
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadIvo Andreev
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기Chiwon Song
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilVICTOR MAESTRE RAMIREZ
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorShane Coughlan
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsJaydeep Chhasatia
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesSoftwareMill
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionsNirav Modi
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmonyelliciumsolutionspun
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Neo4j
 
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Projectwajrcs
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 

Dernier (20)

Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
 
About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9
 
Sustainable Web Design - Claire Thornewill
Sustainable Web Design - Claire ThornewillSustainable Web Design - Claire Thornewill
Sustainable Web Design - Claire Thornewill
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS Calculator
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retries
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!
 
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 

Java and OpenJDK: disecting the ecosystem

  • 1. An inventory of the Java ecosystem
  • 2. What do I want to accomplish with this talk? Software consultant at day, open source developer at night.
  • 3. What is Java anyways? JLS JVMSJava Language Specification Java Virtual Machine Specification 51 character sequences, formed from ASCII letters, are reserved for use as keywords and cannot be used as identifiers (§3.8). Class and interface names that appear in class file structures are always represented in a fully qualified form known as binary names (JLS §13.1). Such names are always represented as CONSTANT_Utf8_info structures (§4.4.7) and thus may be drawn, where not further constrained, from the entire Unicode codespace. Language Preview Specifications + One specification per major release, no changes in update releases: https://docs.oracle.com/javase/specs/ 1. Introduction 11. Exceptions 2. Grammar 12. Execution 3. Lexical structure 13. Binary compatibility 4. Types, values, variables 14. Blocks, statements 5. Conversions, contexts 15. Expressions 6. Names 16. Definite assignment 7. Packages, modules 17. Threads, locks 8. Classes 18. Type inference 9. Interfaces 19. Syntax 10. Arrays 1. Introduction 2. JVM structure 3. Compilation 4. Class file format 5. Loading, linking, initialization 6. JVM instruction set 7. Opcode mnemonics
  • 4. JEPJava Enhancement Proposal JSRJava Specification Request Java Language Specification Java Virtual Machine Specification JCKJava Compatibility Kit TCKsSpecification Test Kits The Java Community Process (JCP). Java Servlet Specification Java Message Specification Java RESTful Web Services (JAX-RS) ... ECExecutive Committee 2020: Alibaba, ARM, Azul, BNY Mellon, Credit Suisse, Eclipse Foundation, Fujitsu, Goldman Sachs, JetBrains, Hazelcast, Hewlett Packard, IBM, Intel, London Java Community, MicroDoc, Oracle, SAP, Software AG, SouJava, Tomitribe, Twitter, V2COM OpenJDK Community TCK and EA TCK License Agreement (OCTLA) spec lead and expert group Jakarta Servlet Specification Jakarta Message Specification Jakarta RESTful Web Services (JAX-RS) ... Jakarta EE Working Group Jakarta EE Steering Committee
  • 5. The Java Community Process (JCP) by example: The Java platform module system (JPMS) JEP JEP 261: Module system JEP 200: The Modular JDK JEP 201: Modular Source Code JEP 220: Modular Runtime Images JEP 162: Prepare for Modularization JEP 179: Document JDK API Support and Stability JEP 281: jlink – The Java Linker JEP 275: Modular Java Application Packaging JEP 260: Encapsulate Most Internal APIs JSR RI JSR 376: Java Platform Module System Maling lists: jpms-spec-experts jpms-spec-observers jpms-spec-comments Voting process: 12.2014 JSR Review 11.2015 JSR Renewal 04.2017 Review 06.2017 Review Reconsideration 08.2017 Final Approval OpenJDK OpenJDK project: Jigsaw Maling lists: jigsaw-dev Project sponsor: Compiler Group EA build: jdk.java.net Specification diffs: JLS, JVMTS, JAR, JNI, JVMTI, JDWP
  • 6. Specification versus implementation Many ways to implement a Java virtual machine specification compliant. This is more obvious for Java EE where different application containers are explicitly branded as such. Sun HotSpot Appeal VM JRockit Apache Harmony Java compatibility kit (JCK) - not open-sourced JVMS? JVMS? JVMS? GPL + CP exception commercial Apache license public static void main(String[] args) { System.out.println("Hello world!"); } OCTLA: free if made available under the GPL, no change within namespace, heavily OpenJDK- derived, Oracle-approved
  • 7. OpenJDK: a project to implement a reference of the specification for common use jdk jdk*u hg.openjdk.java.net mirror.vendor.com jdk.java.net (Java 14 EA) adoptopenjdk.net (Java 8 - 13) OpenJDK Vulnerability Group (OJVG) aws.amazon.com/corretto azul.com bell-sw.com developers.redhat.com/products/openjdk sap.github.io/SapMachine oracle.com/technetwork/java/javase Oracle contributor agreement (OCA): shared copyright with Oracle jdk.java.net (Java 13, 6 months)
  • 8. The OpenJDK project: governance model. Group Project Participant Contributor OpenJDK Member OpenJDK Lead JDK Release Project Group Lead Group MemberAuthor Committer Reviewer Project Lead Chair 2x At-Large Member Vice-Chair x Observer openjdk.java.net/census
  • 9. The OpenJDK project: proposing and applying a patch. Request for Enhancement (RFE) Request for Comments (RFC) Request for Review (RFR) patch hg diff (inline) webrev Sponsor jtreg JCK Merge Compatibility and Specification Review (CSR) Backport 1. Remember tooling. 4. Remember JVMTI 2. Remember JNI 5. Remember JPDA. 3. Remember reflection API. 6. Remember serialization.
  • 10. The OpenJDK project: backporting and update projects. hg.openjdk.java.net jdk/jdk jdk-updates/jdk13u jdk/jdk13 jdk-updates/jdk12u jdk/jdk12 jdk-updates/jdk11u jdk/jdk11 jdk-updates/jdk11u-dev jdk-updates/jdk10u jdk/jdk10 jdk10/jdk10 jdk-updates/jdk9u jdk9/jdk9 jdk8/jdk8u jdk8/jdk8 jdk8/jdk8u-dev jdk7/jdk7u jdk7/jdk7 jdk7/jdk7u-dev jdk6/jdk6 September 2018
  • 11. The OpenJDK project: clone, build and test DIY. sudo apt install mercurial ./build/linux-x86_64-server-release/jdk/bin/java --fullversion hg clone https://hg.openjdk.java.net/jdk/jdk cd jdk sudo apt install build-essential bash configure --with-boot-jdk=~/jdk-13 make images hg clone https://hg.openjdk.java.net/code-tools/jtreg sh jtreg/make/build-all.sh ~/jdk-8 bash configure --with-boot-jdk=~/jdk-13 --disable-warnings-as-errors openjdk full version "14-internal+0-adhoc.rafael.jdk" export JT_HOME=~/jtreg/build/images/jtreg bash configure --with-boot-jdk=~/jdk-13 --disable-warnings-as-errors make test-tier1
  • 12. In what way do OpenJDK builds differ? jdk jdk*u hg.openjdk.java.net hotspot java.base jdk.compiler jdk jdk*u OpenJ9 openj9 java.base jdk.compiler jdk jdk*u Azul Zing hotspot java.base jdk.compiler hotspot/gc/c4 hotspot/jit/falcon hotspot/readynow JDK JRE-compact1 JRE (with JavaFX)JRE multiple binaries possible
  • 13. What are the more common OpenJDK distributions? ZULUZING Oracle OpenJDK
  • 14. Other VMs that offer subset functionality. DAVLIK ART CE EE Substrate Does not support all standard APIs, e.g. java.awt, java.swing, java.beans, java.instrumentation. Does not support Java byte code at runtime (Dalvik: dex format, ART: native). JCK-approved VM unless compiled via native-image extension (Substrate VM): - Requires setup to use reflection. - JVMTI and security manager not supported. - Dynamic byte code not supported. - Method handles and invokedynamic (unless via lambda meta factory) not supported.
  • 15. Name Runtime JIT GC Versions Platforms Free Support JCK AdoptOpenJDK HotSpot C1/C2 G1, SR, PL, ZGC, SH* 8 - 13 Linux, Mac, Win Yes Yes No AdoptOpenJDK OpenJ9 OpenJ9 Openj9 8 - 13 Linux, Mac, Win Yes Yes No Oracle OpenJDK HotSpot C1/C2 G1, SR, PL, ZGC 13, 14-EA, EA Linux, Mac, Win* Yes No Yes Oracle JDK HotSpot C1/C2 G1, SR, PL, ZGC 8, 11, 13 Linux, Mac, Win No Yes Yes Azul Zing HotSpot C1/Falcon C4 8, 11 Linux No Yes Yes Azul Zulu HotSpot C1/C2 G1, SR, PL, ZGC, SH* 6 - 13 Linux, Mac, Win Yes Yes Yes Red Hat OpenJDK HotSpot C1/C2 G1, SR, PL, ZGC, SH 8, 11, 13 RHE Linux, Win Yes Yes Yes SAP Machine HotSpot C1/C2 G1, SR, PL, ZGC, SH* 11, 13 Linux, Mac, Win Yes No Yes Corretto HotSpot C1/C2 G1, SR, PL, ZGC 8, 11 Linux, Mac, Win Yes On AWS Yes Liberica HotSpot C1/C2 G1, SR, PL, ZGC, SH* 8, 11, 13 Linux, Mac, Win Yes Yes Yes Dragonwell HotSpot C1/C2 G1, SR, PL 8 Linux Yes No Yes Pivotal Spring RT HotSpot C1/C2 G1, SR, PL 7 - 12 Linux Yes Yes No Graal VM HotSpot C1/Graal G1, SR, PL 8 Linux, Mac, Win* Both Yes Yes Substrate VM None Graal GenScavenge 8 Linux, Mac, Win* Both Yes No Android ART ART ART 7 (subset 8) Android Yes No No Debian HotSpot C1/C2 G1, SR, PL, ZGC, SH* 8 - 13 Linux Yes No No Note: ZGC supported since Java 11. Deprecated CMS not mentioned. Shenandoah (SH) marked with a star available since Java 12. SR = serial, PL = parallel. Only subset of platforms.
  • 16. Java is still free (dah!). java -XX:+UnlockCommercialFeatures MyApp java MyApp Oracle OpenJDK java -XX:+UnlockCommercialFeatures MyApp java MyApp java MyApp Java 8u202 (January 2019) Java 8u211 (April 2019) java -XX:+UnlockCommercialFeatures MyApp Java 8u40 (March 2015) Java 13.0.1 (October 2019), updates until March 2020 Old versions: No license change! Free unless commercial options are enabled in production environments.
  • 17. Release cadence: Oracle OpenJDK vs Oracle JDK. Sep '17 Mar '18 Sep '18 Mar '19 Sep '19 Mar '20 Sep '20 Mar '21 Java 9 Java 10 Java 11 Java 12 Java 13 Java 14 Java 15 Java 8 (until March 2022, extended: March 2025) Java 11 (until March 2023, extended March 2026) Java 8 Java 12 Java 13 Java 14 Java 15
  • 18. Release cadence: Red Hat OpenJDK and others. Sep '17 Mar '18 Sep '18 Mar '19 Sep '19 Mar '20 Sep '20 Mar '21 Java 8 (until June 2023) Java 11 (until October 2024) Java 8 Java 11 Java 7 (until June 2020)
  • 19. Release cadence: Azul Zulu. Sep '17 Mar '18 Sep '18 Mar '19 Sep '19 Mar '20 Sep '20 Mar '21 Java 6 (until December 2021) Java 13 (March 2023) Java 7 (until July 2023) Java 8 (until March 2026) Java 11 (until September 2027) Java 15 (March 2023) Java 6 (until 2019)
  • 20. How involved are companies in the OpenJDK? Sources: https://blogs.oracle.com/java-platform-group/building-jdk-11-together https://blogs.oracle.com/java-platform-group/the-arrival-of-java-13
  • 21. Software license families. public domain permissive strong copyleft restrictive trade secret 2/3-clause BSD MIT Apache 4-clause BSD GPL LGPL AGPL BCL GPL + CPE dual licensed ? EPL weak copyleft
  • 22. Adoption strategy: bleeding edge versus LTS. Java 8 (bytecode 52) Java 11 (bytecode 55) module-info.class encapsulation of reflective access built-in class loader implementation change platform class loader replaces extension mechanism new URL schema for class file resources new version string format reduction of preconfigured modules (in Java 9) Java 13 (bytecode 57) Enhanced deprecation (since Java 10) sun.misc.Unsafe::defineClass removed (in Java 12) Java 14-EA (bytecode 58) -net.bytebuddy.experimental=true Java 14+X (bytecode 58+X) invokedynamic (Java 7) nestmates (Java 11) constantdynamic (Java 11) java.bytecode.* (?) Most changes are performance improvements or feature extensions! Update your libraries, don't "hack" and you should be fine.
  • 23. Migrating from Java EE to Jakarta EE. jakarta.servlet.* jakarta.ws.rs.* ... javax.servlet.* javax.ws.rs.* ... javax.sql.* javax.management.* ... public class LegacyServletBridge implements jakarta.servlet.Servlet { private final javax.servlet.Servlet delegate; public LegacyServlet(javax.servlet.Servlet delegate) { this.delegate = delegate; } @Override public void service(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse resp) { delegate.service(new LegacyServletRequest(req), new LegacyServletResponse(resp)); } } org.hibernate.validation.* javax.validation.*
  • 24. The Java developer (advocacy) community. developer advocacy developer "recognition" developer awards meetups and developer conferences
  • 25. Project preview: Loom. public class SampleServlet extends HttpServlet { private final HttpClient client; public SampleServlet(HttpClient client) { this.client = client; } @Override protected void doGet( HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { resp.getOutputStream().write(client.fetchResponse()); } } public class SampleServlet extends HttpServlet { private final HttpClient client; public SampleServlet(HttpClient client) { this.client = client; } @Override protected void doGet( HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { AsyncContext context = req.startAsync(); client.fetchResponseAsync().onComplete(response -> { context.getResponse().getOutputStream().write(response); context.complete(); }); } } run doGet fetchResponse OS-backed-thread doGet fetchResponse doGet fetchResponse suspend runrun jdk.java.net/loom fibers/continuations tail-call optimization
  • 26. Project preview: Panama. jdk.java.net/panama foreign function interface data layouts jextract -t nvidia -L /usr/lib -lnvidia-ml --record-library-path /opt/cuda/targets/x86_64-linux/include/nvml.h -o nvidia.jar import java.foreign.*; import java.foreign.memory.*; import java.lang.invoke.MethodHandles; import nvidia.nvml_h; import nvidia.nvml_lib; public class Sample { public static void main(String[] args) { Libraries.loadLibrary(MethodHandles.lookup(), "nvidia-ml"); try(Scope s = nvml_lib.scope().fork()) { nvml_lib.nvmlInit_v2(); } } } Look into JNA for a currently available solution without direct JVM-support.
  • 27. Project preview: Valhalla. a b c class NonPrimitiveSample { Integer a, b, c; } Integer 42 class PrimitiveSample { int a, b, c; } a = 42 b = 84 c = 1 object object Integer 84 object object Integer 1 object object new PrimitiveSample() new NonPrimitiveSample() jdk.java.net/valhalla inline types generic specialization cache lines: stales processor inline class
  • 28. Project review and preview: Amber. Collection of language extensions: Local variable type inference (Java 10) Switch expressions (Java 12, Java 13, preview) Pattern matching for instanceof Records Enhanced enums (on hold) var value = "Hello World!"; Function<String, String> f = (@NonNull var arg) -> arg;Function<String, String> f = arg -> arg;Function<String, String> f = (var arg) -> arg; int result = switch (input) { case "foo" -> 1; case "bar" -> 2; default -> 3; } int result; switch (input) { case "foo": result = 1; break; case "bar": result = 2; break; default: result = 3; } "twonlinesn"""" two lines """ Object o = fetch(); if (o instanceof String s) { String result = s; } String text = String.format("%s: %d", new Object[] {"foo", new Integer(42)}); String text = String.format("%s: %d", "foo", 42); Local-variable syntax for lambda parameters (Java 11) Text blocks (Java 13, preview) Java Compiler intrinsics API Sealed types Lambda leftovers (on hold) String text = (invokedynamic) DynamicFormat::format, "%s: %d", "foo", 42; sealed interface Base permits Foo, Bar { } record Foo(String bar) { }
  • 29. Project overview: Graal. java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler -Djvmci.Compiler=graal MyApp jaotc -output MyApp.so MyApp.class java -XX:AOTLibrary=./libMyApp.so MyApp native-image -cp myapp.jar MyApp interface JVMCICompiler { CompilationRequestResult compileMethod(CompilationRequest request); } import org.graalvm.polyglot.Context; class GraalJavaScript { public static void main(String[] args) { try (Context context = Context.newBuilder().allowNativeAccess(true).build()) { System.out.println(context.eval("js", "14 + 2")); } } }