-
Sub-task
-
Resolution: Withdrawn
-
P3
-
None
-
9
-
None
-
Verified
The javap tool must be updated to enable selection of versioned class files.
Currently
$ javap -cp version.jar version.Version
will display the attributes of the base entry in a multi-release jar file (i.e. version/Version.class). If one wants to inspect versioned entries they need to specifically request a class through a jar url as in
$ javap jar:file:version.jar\!/META-INF/versions/9/version/Version.class
What we'd like to do is add a command line option to select the appropriate version of the class.
It turns out that javap already has such a command line option, -multi-release. So one can select appropriate classes like this:
$ javap -cp version.jar version.Version (for the base version)
$ javap -cp version.jar -multi-release 9 version.Version (for the jdk 9 version)
$ javap -cp version.jar -multi-release runtime version.Version (also for the jdk 9 version since runtime is equivalent to 9 on jdk 9)
So all we really need to do is to document the option.
Currently
$ javap -cp version.jar version.Version
will display the attributes of the base entry in a multi-release jar file (i.e. version/Version.class). If one wants to inspect versioned entries they need to specifically request a class through a jar url as in
$ javap jar:file:version.jar\!/META-INF/versions/9/version/Version.class
What we'd like to do is add a command line option to select the appropriate version of the class.
It turns out that javap already has such a command line option, -multi-release. So one can select appropriate classes like this:
$ javap -cp version.jar version.Version (for the base version)
$ javap -cp version.jar -multi-release 9 version.Version (for the jdk 9 version)
$ javap -cp version.jar -multi-release runtime version.Version (also for the jdk 9 version since runtime is equivalent to 9 on jdk 9)
So all we really need to do is to document the option.
- relates to
-
JDK-8132734 JDK 9 runtime changes to java.util.jar to support multi-release jar files
- Closed
-
JDK-8149757 Implement Multi-Release jar aware JavacFileManager for javac
- Closed