| What is going to happen? |
|---|
| What is going to change? |
| Is Java still free? |
| How hard is it to update to Java 11? |
| What's new in the new JDK |
- Six-months release cycle
- New licensing and long-term support (LTS) models
- OpenJDK is the new normal
- From Java 8 onto a modular and flexible JDK
In the past, Java major releases where
long-running and irregular
- Java 7 took 5 years
- Java 8 took 3 years
- Java 9 took 3.5 years
"Fat" releases had a massive impact
on the way we write Java code
- Java 5: Generics
- Java 8:
- Functional constructs (
λ) - Streams
- Method Reference (
::)
- Functional constructs (
- Java 9: Java Module System (Jigsaw)
A brand-new major Java SE version will be released every 6 months (in September and March)
The rate of innovation doesn’t change.
The rate of innovation delivery increases.— Mark Reinhold
This started with Java 9, released in September 2017
| Then |
|---|
| Mar 18 Java 10 |
| Sep 18 Java 11 (LTS) |
| Mar 19 Java 12 |
| Sep 19 Java 13 |
| Mar 20 Java 14 |
| Sep 20 Java 15 |
| Mar 21 Java 16 |
| Sep 21 Java 17 (LTS) |
| ... |
- Released 03/2014
- is a LTS release
- free support ends 01/2019
- Released 09/2017
- Already unmantained
- free support ended 03/2018
- Released 03/2018
- Already unmantained
- free support ended 09/2018
Current version of Java, which is a LTS:
- free updates from 09/2018 to 03/2019 (six months)
- OracleJDK commercial support for 5+ years
- free updates from AdoptOpenJDK
Starting from JDK 11, OpenJDK is the official JDK source code repository.
From the OpenJDK repo, each vendor build its binary distribution:
- Oracle builds and mantains OracleJDK
- Oracle also - during the life of a JDK version, 6 months - builds and ships the binary of OpenJDK
- AdoptOpenJDK - checks out source code and build their binary version of JDK
- RedHat JDK ( + their stuff, e.g. Shenandoah GC)
- AzulJDK binary => Zulu
⇝ OpenJDK is the new normal!
During the 6 months of life of Java 11
- OpenJDK binary, AdoptOpenJDK, Azul Zulu
- all GPL license.
- You can use them for free in production.
- OracleJDK
- pay for use it in production (from version 11 onwards).
You can choose:
- upgrade to Java 12
- stay in Java 11
If you stay on Java 11, you could
- Never update
- => exposed to security vulnerabilities, bugs, ...
- Update to Java 11.0.something
- => BUT where do you take that patched version?
- (actually OpenJDK 11)
- No backporting on the previous versions!
but you'll need a "Java SE Subscription" to have the LTS updated binary
(this is actually what LTS means)
- The community + RedHat should backport fixes
- How much time will be taken to fix a vulnerability once found (and published)? Nobody knows! We'll see...
After RedHat+Community fix / patch the source repo, someone will have to build a new JDK binary distribution with that bug/vulnerabilities fixed.
- AdoptOpenJDK => offers free builds of LTS JDK (via GPL)
- other vendors (Oracle, RedHat, IBM, Azul, ...) => you have to pay for this!
Let me assure you of one thing: whether by Oracle or Red Hat or someone else, JDK LTS releases will continue to be supported. We all have a lot invested in Java, and we won’t let it fall.
- Java 8 was all about how we write code differently.
- Java 9 is all about how we package and deploy our code. There are almost no code change.
- Java 8 changes how we think to and write code.
- Java 9 changes how we package code.
- Upgrading from 8 to 9/10/11 is NOT simple
- Many runtime behavior changes
- Needs very thorough testing
URL resource = sysCL.getResource("/com/foo/bar.properties");
// It’s there, but it won’t find it!
resource = null;⋊> ~/D/w/m/phoenix-project on master ⨯ rg -i "class.*getResource\("
ispservicestub/src/com/xpeppers/ispservicestub/ISPServiceStubEnvironment.java
21: return this.getClass().getClassLoader().getResource(configurationFilePath);
alipaystub/src/com/xpeppers/alipaystub/AlipayStubEnvironment.java
21: return this.getClass().getClassLoader().getResource(configurationFilePath);
mybankstub/src/com/xpeppers/main/MyBankStubEnvironment.java
19: return this.getClass().getClassLoader().getResource(configurationFilePath);
phoenix/src/com/xpeppers/phoenix/main/BatchEnvironment.java
38: return this.getClass().getClassLoader().getResource(configurationFilePath);
stresstest/src/com/xpeppers/phoenix/stress/StressTest.java
12: URL confFile = this.getClass().getClassLoader().getResource("stresstest.properties");
simonidis/src/com/xpeppers/phoenix/fakeauthorizationws/SimonidisEnvironment.java
17: return this.getClass().getClassLoader().getResource(configurationFilePath);
minos/src/com/xpeppers/minos/domain/AcsVereqVerifier.java
24: private final static URL schemaPath = AcsVereqVerifier.class.getResource("/dtd/acs_vereq_schema.xsd");
minos/src/com/xpeppers/minos/domain/validators/PareqSyntaxValidator.java
21: private final static URL schemaPath = PareqSyntaxValidator.class.getResource("/dtd/acs_pareq_schema.xsd");
caffrey/src/com/xpeppers/phoenix/caffrey/cardgateway/CardEnrollmentMapper.java
70: URL resource = this.getClass().getClassLoader().getResource(configurationFilePath);### Internal APIs encapsulated!
- Cannot access
sun.*orcom.sun.*classes anymore!
Just one example:
minos/src/com/xpeppers/minos/domain/SignXMLDOMforNewHSM.java
3:import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
4:import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer;
5:import com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException;
23:import static com.sun.org.apache.xml.internal.security.Init.init;
24:import static com.sun.org.apache.xml.internal.security.c14n.Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS;public is not the same anymore!
A public class is available, but has to be exported by its containing module to be "visible".
public + exports becomes visible outside the module!
Old jars will be assumed to be modules in Java 9.
- Java 9 will assume that the name of the module is the name of the jar
- e.g.
junitis the name of the module for thejunit-4.12.jarjar
- e.g.
- It will also export everything in that jar.
- It will require all you are using.
All stuff that is in the classpath (tipically jars) will be put into an "unnamed" module.
- It reads every named modules.
- It exposes every package.
- Code in named modules cannot depend on code in the unnamed module.
docker run --rm -it openjdk:11-slim /bin/jshell
Create your own JRE images:
- with the JDK modules your app needs
- with all modules (JDK, app, deps)
Smells like a "Docker" approach for the Java world.
- First, update all your dependencies first (libraries, frameworks, etc)
- Update your app server to latest version (is compatible with Java 9) - e.g. Tomcat, Jetty, etc
- BTW is your IDE ready?
Kotlin support for Java 9 and Java 10
-
Java 9/10/11 - What's new and why you should upgrade
-
Java Next! Release Cadence, Licensing, And LTS
The State of Developer Ecosystem Survey in 2018

