Java 9, ein Über- und Ausblick

Volker Simonis, SAP / volker.simonis@gmail.com


Wie alles begann..

Java in a Nutshell Java in a Nutshell
Version Datum Besonderheiten
1.0 1996 Erste stabile Version
1.1 1997 Inner classes, Reflection, RMI, JDBC, JIT (Windows/Symantec)
1.2 1998 Swing, Collection framework, strictfp, Corba, JIT (Sun/commercial)
1.3 2000 JPDA, JNDI, Java Sound, HotSpot VM
1.4 2002 assert, regexp API, NIO, JAXP, JCE, WebStart, Logging API
5.0 2004 Generics, Annotations, Enumerations, Varargs, Java Memory Model, JVMTI
6 2006 Scripting API, Compiler API, SwingWorker, JAXB, JAX-WS, JDBC 4.0, G1
7 2011 invokedynamic, Dimond-operator, try-with-resources, NIO2, EC crypt.
8 2014 Lambda expressions, Stream API, Type annotations, Date and Time API
9 2017 Modules, AOT, jlink
18.3 2018 Local variable type inference

Write once, run anywhere (and anytime)..

Oracle Archive Page - http://www.oracle.com/technetwork/java/archive-139210.html


The OpenJDK Project


  • Open Source implementation of Java SE
  • Licensed under GPLv2 (with Classpath exception)
  • Reference implementation for Java 7, 8, 9, ..
  • Collaboration space for different implementers:
    • RedHat, SAP, IBM, Google, Intel, Twitter, Azul
  • Playground for Java SE related projects:
    • Coin, InvokeDynamic, Lambda, Nashorn, Jigsaw, ...
    • Graal, Panama, Valhalla, Shanandoa, Metropolis, Loom ...

OpenJDK Genealogy

  • Everything started with an early development version of JDK 7
    • OpenJDK 6 was a retrofitted JDK 6 port of this version
  • IcedTea - a free build harness
  • Today there's a wild zoo of different OpenJDK builds and distributions:
  • "Commercial" versions of OpenJDK
    • Oracle JDK, SAP JVM, HP JDK, Azul Zing, IBM / Open J9 (only class library)

OpenJDK and the Java™

  • You are not allowed to call it Java™ (or Java™ compatible) because:
    • "Java" is a registered trademark
    • You don't get access to the Technology Compatibility Kit (TCK)
  • Accessing the TCK requires the signing of the
    OpenJDK Community TCK License Agreement (OCTLA)
    • Only for OpenJDK or "substantially derived" projects
    • OCTLA forbids disclosing TCK information to non-OCTLA licensees
  • OCTLA is no trademark license!
  • "OpenJDK" can be used according to the "OpenJDK Trademark Notice"

OpenJDK Organization

  • Participants: individuals who subscribed to an OpenJDK mailing list
  • Contributors: Participants who signed the OCA
  • Groups (currently 22)
    • consist of Group Members and a Group Lead
      • Group Members elect new Group Members from Contributors
    • sponsor Projects
  • Projects (currently 60)
    • produce artifacts (code, documentation, whole JDK releases)
    • have code repositories, mailing lists and possibly web content
    • consist of Authors, Committers, Reviewers and a Project Lead
      • Project Leads appoint Authors from Contributors
      • Committers elect new Committers from Authors

OpenJDK Infrastructure

OpenJDK Tools - Mercurial

  • Mercurial is a distributed source control system implemented in Python.
  • OpenJDK uses nested sub-repositories (i.e. "forest"):
    • clone them (corba, hotspot, jaxp, jaxws, jdk, langtools, nashorn) manually:
      $ hg clone http:/​/hg.openjdk.java.net/jdk9/dev jdk9-dev
      $ cd jdk9-dev
      $ hg clone http:/​/hg.openjdk.java.net/jdk9/dev/corba
      $ hg clone http:/​/hg.openjdk.java.net/jdk9/dev/nashorn
    • or use the get_source.sh script which does the same in parallel:
      $ hg clone http:/​/hg.openjdk.java.net/jdk9/dev jdk9-dev
      $ cd jdk9-dev
      $ sh get_source.sh
  • Use common/bin/hgforest.sh to execute hg commands in all repositories

OpenJDK Tools - Mercurial

Building the OpenJDK

Building the OpenJDK

$ hg clone http:/​/hg.openjdk.java.net/jdk10/hs/ jdk10-hs
$ cd jdk10-hs
$ bash ./configure --with-native-debug-symbols=external --with-debug-level=slowdebug
configure: Configuration created at Fri Sep 29 00:43:09 CEST 2017.
$ make images LOG=debug
Start 2017-09-29 00:44:29
End   2017-09-29 01:02:08
00:17:39 TOTAL
$ ./build/linux-x86_64-normal-server-slowdebug/images/jdk/bin/java -version
openjdk version "10-internal"
OpenJDK Runtime Environment (slowdebug build 10-internal+0-adhoc.simonis.jdk10-hs)
OpenJDK 64-Bit Server VM (slowdebug build 10-internal+0-adhoc.simonis.jdk10-hs mixed mode)

On error use “make images JOBS=1” and take a look at “build.log

JEP - The JDK Enhancement-Proposal & Roadmap Process

JCP - The Java Community Process

  • A formalized mechanism for developing Java specifications
  • Not an independent standards organization / legal entity
    • A vendor consortium dominated by Oracle
  • Membership requires fee for organizations/companies but is free for individuals
  • JSR's (Java Specification Requests) for proposing and specifying new technologies:
    • A final JSR provides a free reference implementation and
    • A TCK (Technology Compatibility Kit) for verification
  • Currently the JCP specifies three platforms: Java ME, Java SE and Java EE
  • JCP is being criticized as being a "rubber stamp organization", but see:
(c) https://docs.oracle.com/javase/8/docs/index.html


(c) https://twitter.com/mreinhold/status/882644292036026368
(c) https://twitter.com/mreinhold/status/882644292036026368
(c) https://docs.oracle.com/javase/9/docs/api/java.se.ee-graph.png


The future of the Java/OpenJDK

  • New six month, release cadence
  • Many new projects: Panama, Valhalla, Graal, Loom, Metropolis
  • Competition: Open J9
102: Process API Updates
110: HTTP 2 Client
143: Improve Contended Locking
158: Unified JVM Logging
165: Compiler Control
193: Variable Handles
197: Segmented Code Cache
199: Smart Java Compilation, Phase Two
200: The Modular JDK
201: Modular Source Code
211: Elide Deprecation Warnings on Import Statements
212: Resolve Lint and Doclint Warnings
213: Milling Project Coin
214: Remove GC Combinations Deprecated in JDK 8
215: Tiered Attribution for javac
216: Process Import Statements Correctly
217: Annotations Pipeline 2.0
219: Datagram Transport Layer Security (DTLS)
220: Modular Run-Time Images
221: Simplified Doclet API
222: jshell: The Java Shell (Read-Eval-Print Loop)
223: New Version-String Scheme
224: HTML5 Javadoc
225: Javadoc Search
226: UTF-8 Property Files
227: Unicode 7.0
228: Add More Diagnostic Commands
229: Create PKCS12 Keystores by Default
231: Remove Launch-Time JRE Version Selection
232: Improve Secure Application Performance
233: Generate Run-Time Compiler Tests Automatically
235: Test Class-File Attributes Generated by javac
236: Parser API for Nashorn
237: Linux/AArch64 Port
238: Multi-Release JAR Files
240: Remove the JVM TI hprof Agent
241: Remove the jhat Tool
243: Java-Level JVM Compiler Interface
244: TLS Application-Layer Protocol Negotiation Extension
245: Validate JVM Command-Line Flag Arguments
246: Leverage CPU Instructions for GHASH and RSA
247: Compile for Older Platform Versions
248: Make G1 the Default Garbage Collector
249: OCSP Stapling for TLS
250: Store Interned Strings in CDS Archives
251: Multi-Resolution Images
252: Use CLDR Locale Data by Default
253: Prepare JavaFX UI Controls & CSS APIs for Modularization
254: Compact Strings
255: Merge Selected Xerces 2.11.0 Updates into JAXP
256: BeanInfo Annotations
257: Update JavaFX/Media to Newer Version of GStreamer
258: HarfBuzz Font-Layout Engine
259: Stack-Walking API
260: Encapsulate Most Internal APIs
261: Module System
262: TIFF Image I/O
263: HiDPI Graphics on Windows and Linux
264: Platform Logging API and Service
265: Marlin Graphics Renderer
266: More Concurrency Updates
267: Unicode 8.0
268: XML Catalogs
269: Convenience Factory Methods for Collections
270: Reserved Stack Areas for Critical Sections
271: Unified GC Logging
272: Platform-Specific Desktop Features
273: DRBG-Based SecureRandom Implementations
274: Enhanced Method Handles
275: Modular Java Application Packaging
276: Dynamic Linking of Language-Defined Object Models
277: Enhanced Deprecation
278: Additional Tests for Humongous Objects in G1
279: Improve Test-Failure Troubleshooting
280: Indify String Concatenation
281: HotSpot C++ Unit-Test Framework
282: jlink: The Java Linker
283: Enable GTK 3 on Linux
284: New HotSpot Build System
285: Spin-Wait Hints
287: SHA-3 Hash Algorithms
288: Disable SHA-1 Certificates
289: Deprecate the Applet API
290: Filter Incoming Serialization Data
291: Deprecate the Concurrent Mark Sweep (CMS) GC
292: Implement Selected ECMAScript 6 Features in Nashorn
294: Linux/s390x Port
295: Ahead-of-Time Compilation
297: Unified arm32/arm64 Port
298: Remove Demos and Samples
299: Reorganize Documentation