Simon Ritter, Deputy CTO, from Azul Systems gave a great presentation to 100 java developers about new things in Java 9,10,11, and 12. Slides are at www.slideshare.net/SimonRitter/moving-towards-jdk-12.
I did java programming 12 years ago and it was great fun to come back to the Java User's Group to see old friends again. Currently I'm doing C# .Net Core work, but I wanted to see what Java has been faring.
TL;DR: My impressions: Java is going to face headwinds with Oracle requiring money for licenses for production versions of JDK and beyond. Especially for small shops it's just easier to spin up a container with all open source and not worry about payments. Many organizations will stick with older free versions of Java (which is where Azul can make some money and help the community), but after a while, do you want to be on older versions of a language while the world is moving forward? It will be like watching ice melt on a 33 degree day, but we will see a slow abandonment of Java.
Java is still playing catchup with C# on features like "var", expanding switch statements, and raw string literals, but it's good to see the progress.
Here's my random, jumbled notes:
JDK 9, September 2017 86 new items. Oracle says JDK 9 was the last big release.
Java Platform Module System (JPMS) (JEP 220) breaks the 4,500 classes in Java into smaller chunks; with Modules you can create a runtime specific for your application only including modules needed for the app.
jlink (JEP 282) creates the java hierarchy with a smaller set of modules.
Instead of a release every two years, Oracle will release new JDKs twice a year, once in March and once in September. With so many releases, only certain ones will have long term support.
In JDK 11, some parts of the JDK will be open sourced like Flight recorder and Mission control. Some commercial features will be removed like JavaFX.
Java 8 had 350 methods deprecated, but never removed. JDK 9 removed six methods and one class (JavaBeans had a dependency on the desktop). JDK 10 removed 1 package, 6 classes, 9 methods and 1 field.
Compatibility not guaranteed in the future. Developers will have one release (six months) warning of deprecated.
Oracle JDK binary has LTS versions like 11, 17; Oracle OpenJDK does not.
Oracle JDK 11 has new license. Must have a paid-for license from Oracle for production for JavaSE. JDK 8 can be used forever for free, but without any further security patches and bug fixes.
What's new in JDK 10
Local Variable Type Inference (JEP 286) Java gets "var", infers type (like C#). "var" is not a reserved word, just a reserved type (meaning you can't create a class named "var").
JEP 307: Parallel Full GC for G1
JEP 310: Application Class-Data Sharing. Write java "schema" info to a file, to be read next time to speed startup.
JEP 317: JIT compiler (Graal)
Root Certificates, Heap allocation on other devices, remove javah tool, Garbage Collector Interface (Red Hat), Thread-Local Handshakes.
73 New APIs, like the collections List, Set, Map get a static copyOf() method to get an immutable copy.
What's new in JDK 11
17 JEPs, 3 from outside Oracle, like Red Hat's JEP 318 Epsilon garbage collector.
JEP 323: Local-variable syntax for lambda parameters.
JEP 327: new Unicode 10 Support for 8,518 new characters.
JEP 330: Launch Single file source code. Can launch a single file like "$java Factorial.java 4"
Many security features
Nashorn JavaScript engine deprecated
New I/O methods like nullInuptStream
String has new methods like isBlank(), repeat(int), strip()
Predicate now has Predicate.not()
What's new in JDK 11
Six modules removed, including java.corba, java.transaction, java.activation, java.xml.bind, java.xml.ws, java.xml.ws.annotation
Removes 27 command line flags and added 53
JDK 12 - A Small Release
JEP 325: Switch Expressions (Preview)
JEP 189: Shenandoah GC
JEP 334, 230, 341
New APIs: teeing(Collector, Collector, joinerFunc)
Class - describeConstable
Long Term Future
Project Amber, how to simplifying Java Language syntax. Kotlin is popular due to its clean syntax.
JEP 302: Lambda bits, single underscore for unused jparameters in lambda
JEP 326: Raw string literals, use backtick to start raw strings
JEP 305: Pattern Matching
Project Valhalla
Primitives are good for performance, objects good for OO concepts
Can have collections of primitives
Value types, are immutable, really
Project Loom
Loom introduces "fibres" which are lighter weight threads, less memory used, lower overhead
Zulu Java
Zulu community - Free versions of Open versions.
Zulu Enterprise - For money you can get backports of bug fixes and security patches from latest OpenJDK to previous releases.
Questions?
What is the effect of Oracle's new licensing pricing on the cloud? Cloud providers will provide support.
No more free JDK 11 from Oracle.
<
No comments:
Post a Comment