Compile for older platform versions [JEP 247]

The Java Compiler, javac, has been updated for Java 9 to ensure it can be used to compile Java programs to run on user-selected older versions of the Java platform. This was the focus of Java Enhancement Proposal 247, Compile for Older Platform Versions.

As you can see in the following screenshot, javac has several options including -source and -target. The javac presented in the following screenshot is from Java 8:

The -source option is used to dictate the Java version accepted by the compiler. The -target option informs which version of class files javac will produce. By default, javac generates ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.