O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

Let's look at the layout of the content in mr.jar

jar -tvf mr.jar

The contents of the JAR is as shown in the following:

The preceding layout we have META-INF/versions/9 which contains the Java 9 specific code. Another important thing to note is the contents of the META-INF/MANIFEST.MF file. Let's extract the JAR and view its contents:

jar -xvf mr.jar$ cat META-INF/MANIFEST.MFManifest-Version: 1.0Created-By: 9 (Oracle Corporation)Main-Class: com.packt.FactoryDemoMulti-Release: true

The new manifest attribute Multi-Release is used to indicate if the JAR is a multirelease JAR or not.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required