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

Mob Programming Our Way to Java SE 11 Proficiency

Mob Programming Our Way to Java SE 11 Proficiency

Presented by: Dan Fraser

Java 11 came out this week. It is the first Long-Term Support (LTS) release of Java since Java 8, which according to a show of hands at last month's Meetup, you are probably still using.

The LTS status means Java 11 is likely to be the next version you adopt. Are you ready? Is your IDE ready? Will your frameworks run under Java 11? What's new in this release anyway?

At this month's JUG, we intend to find out together in a group-directed live coding session (aka Mob Programming).

Join us as we learn, laugh, and muddle through it together.

Toronto Java Users Group

September 27, 2018
Tweet

More Decks by Toronto Java Users Group

Other Decks in Education

Transcript

  1. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JDK 11

    RELEASED 2018-09-25 ▸ Long term support release: it’s complicated. ▸ Oracle JDK continues to be available royalty-free for development, testing, prototyping or demonstrating purposes. ▸ Oracle JDK licenses for any production use are $25/month/processor, with quantity discounts available. ▸ Premier Support Until September 2023 ▸ Extended Support Until September 2026
  2. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE OPENJDK AND

    THE FUTURE ▸ If you don’t want to pay for support, use OpenJDK. ▸ OpenJDK builds from Oracle on http://jdk.java.net for at least 6 months after release*
 *http://mail.openjdk.java.net/pipermail/jdk-dev/2018-August/001824.html ▸ Future binary support of OpenJDK from third parties? TBD… ▸ AdoptOpenJDK doesn’t have JDK 11 as of September 26 ▸ You can always build it yourself…
  3. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 181:

    NEST-BASED ACCESS CONTROL ▸ Specific support in the JVM for access of nested classes. ▸ Avoids the use of compiler-inserted bridge methods. ▸ Improves encapsulation, makes code smaller. ▸ No visible changes to the Java language.
  4. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 309:

    DYNAMIC CLASS-FILE CONSTANTS ▸ Extend the Java class-file format to support a new constant-pool form, CONSTANT_Dynamic. Loading a CONSTANT_Dynamic will delegate creation to a bootstrap method, just as linking an invokedynamic call site delegates linkage to a bootstrap method. ▸ No visible changes to the Java language. ▸ Mob Task: Figure out what this means.
  5. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 315:

    IMPROVE AARCH64 INTRINSICS ▸ Improve the existing string and array intrinsics, and implement new intrinsics for the java.lang.Math sin, cos and log functions, on AArch64 processors. ▸ “Intrinsics” are native subroutines used by the compiler. ▸ Improves math performance on ARM 64-bit systems. ▸ No visible changes to the Java language.
  6. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 318:

    EPSILON: A NO-OP GARBAGE COLLECTOR (EXPERIMENTAL) ▸ Develop a GC that handles memory allocation but does not implement any actual memory reclamation mechanism. Once the available Java heap is exhausted, the JVM will shut down. ▸ Useful for: Performance testing, memory pressure testing, extremely short lived jobs, last-drop latency improvements, last-drop throughput improvements ▸ Epsilon GC looks and feels like any other OpenJDK GC, enabled with
 -XX:+UseEpsilonGC ▸ Mob Task: Make something that runs out of memory in EpsilonGC
  7. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 320:

    REMOVE THE JAVA EE AND CORBA MODULES ▸ Remove the Java EE and CORBA modules from the Java SE Platform and the JDK. These modules were deprecated in Java SE 9 with the declared intent to remove them in a future release:
 
 java.xml.ws (JAX-WS, plus the related technologies SAAJ and Web Services Metadata)
 java.xml.bind (JAXB)
 java.activation (JAF)
 java.xml.ws.annotation (Common Annotations)
 java.corba (CORBA)
 java.transaction (JTA)
 jdk.xml.ws (Tools for JAX-WS)
 jdk.xml.bind (Tools for JAXB) ▸ Mob Task: Mourn loss of CORBA, discuss implications for your builds and dependency alternatives.
  8. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 321:

    HTTP CLIENT (STANDARD) ▸ Standardize the incubated HTTP Client API introduced in JDK 9, via JEP 110, and updated in JDK 10. ▸ Provide a standardized API, in the java.net.http package, based upon the incubated API ▸ Support async programming with Futures, support HTTP/2 ▸ Mob Task: Try it!
  9. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 323:

    LOCAL-VARIABLE SYNTAX FOR LAMBDA PARAMETERS ▸ Allow var to be used when declaring the formal parameters of implicitly typed lambda expressions. ▸ Lambdas were already implicitly typed, this allows consistent syntax and annotations. ▸ Mob Task: Try it!
  10. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 324:

    KEY AGREEMENT WITH CURVE25519 AND CURVE448 ▸ Implement key agreement using Curve25519 and Curve448 as described in RFC 7748. ▸ Better Elliptic Curve support. ▸ Mob Task: Discuss applications. Pretend to understand cryptography.
  11. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 327:

    UNICODE 10 ▸ ⌨ ▸ Upgrade existing platform APIs to support version 10.0 of the Unicode Standard. ▸ Mob Task: Tell Unicode stories!
  12. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 328:

    FLIGHT RECORDER ▸ Provide a low-overhead data collection framework for troubleshooting Java applications and the HotSpot JVM. ▸ Fancy logging with low-level details ▸ Deserves its own talk ▸ Mob Task: Have you used Flight Recorder?
  13. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 329:

    CHACHA20 AND POLY1305 CRYPTOGRAPHIC ALGORITHMS ▸ ChaCha20 is a relatively new stream cipher that can replace the older, insecure RC4 stream cipher. ▸ May be used in future Java TLS implementations.
  14. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 330:

    LAUNCH SINGLE-FILE SOURCE-CODE PROGRAMS ▸ Enhance the java launcher to run a program supplied as a single file of Java source code, including usage from within a script by means of "shebang" files and related techniques. ▸ java HelloWorld.java ▸ Easier quick tests, use Java as a script language. ▸ Mob Task: Demonstrate it!
  15. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 331:

    LOW-OVERHEAD HEAP PROFILING ▸ Provide a low-overhead way of sampling Java heap allocations, accessible via JVMTI. ▸ Fancy new tooling coming soon?
  16. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 332:

    TRANSPORT LAYER SECURITY (TLS) 1.3 ▸ Implement version 1.3 of the Transport Layer Security (TLS) Protocol RFC 8446. ▸ The primary goal is a minimal interoperable and compatible TLS 1.3 implementation. ▸ No visible changes to the Java language except for new supported algorithm names.
  17. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 333:

    ZGC: A SCALABLE LOW-LATENCY GARBAGE COLLECTOR (EXPERIMENTAL) ▸ The Z Garbage Collector, also known as ZGC, is a scalable low-latency garbage collector. ▸ Low latency at a cost of throughput (no more than 15%) ▸ Only supports Linux/x64 to start. ▸ -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ▸ Mob Task: What would you use this for?
  18. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 335:

    DEPRECATE THE NASHORN JAVASCRIPT ENGINE ▸ Deprecate the Nashorn JavaScript script engine and APIs, and the jjs tool, with the intent to remove them in a future release. ▸ With the rapid pace at which ECMAScript language constructs, along with APIs, are adapted and modified, Nashorn is too challenging to maintain. ▸ This deprecation does not affect, in any way, the javax.script API. ▸ JEP may be withdrawn if developers are found, or alternative script engines may be available. ▸ Mob Task: Do you use javax.script?
  19. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JEP 336:

    DEPRECATE THE PACK200 TOOLS AND API ▸ Deprecate the pack200 and unpack200 tools, and the Pack200 API in java.util.jar. ▸ Was built for optimized Java downloads on slow connections (see: applets). ▸ Complex and coupled to Java class format. ▸ Overall, the cost of maintaining Pack200 is significant, and outweighs the benefit of including it in Java SE and the JDK. ▸ Mob Task: Did you ever use Pack200?
  20. TORONTO JAVA USERS GROUP: JDK 11 MOB STYLE JAVA’S FUTURE

    ▸ Mob Task: How does the future of Java look to you?