JDK-8074285 : Multiversion JAR feature: jarsigner do not list version-specific files while signing
  • Type: Bug
  • Component: tools
  • Sub-Component: jar
  • Affected Version: 8u60,9
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: generic
  • CPU: generic
  • Submitted: 2015-03-03
  • Updated: 2016-07-21
  • Resolved: 2016-07-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Relates :  
Description
When we sign an MV-JAR, the tool does not list classes inside META-INF/versions folder.
Although, if we verify a signed jar, classes in "META-INF/versions" folder are listed.

Jarsigner tool do not list version-specific files while signing.
 E.g. I have MV.jar with classes specific to jdk 8.

jarsigner -verbose -keystore key.jks -storepass password -keypass password MV_GUI.jar alias

Output:

updating: META-INF/MANIFEST.MF
   adding: META-INF/ALIAS.SF
   adding: META-INF/ALIAS.RSA
   signing: NewJFrame$1.class
   signing: NewJFrame.class
jar signed.

But seems like classes we signed, cause when I try to verify they are present and checked:
jarsigner -verbose -verify -keystore key.jks -storepass password -keypass password MV_GUI.jar

s k      503 Mon Mar 02 15:29:32 MSK 2015 META-INF/MANIFEST.MF
          625 Mon Mar 02 15:29:32 MSK 2015 META-INF/ALIAS.SF
         1364 Mon Mar 02 15:29:32 MSK 2015 META-INF/ALIAS.RSA
            0 Tue Jan 27 14:02:16 MSK 2015 META-INF/
            0 Mon Feb 02 18:46:28 MSK 2015 META-INF/versions/
            0 Mon Feb 02 18:46:28 MSK 2015 META-INF/versions/8/
smk      506 Mon Jan 26 19:37:34 MSK 2015 META-INF/versions/8/NewJFrame$1.class
smk     3946 Mon Jan 26 19:37:34 MSK 2015 META-INF/versions/8/NewJFrame.class
smk      509 Mon Jan 26 19:44:32 MSK 2015 NewJFrame$1.class
smk     3896 Mon Jan 26 19:44:32 MSK 2015 NewJFrame.class
Comments
Most likely fixed when changeset for JDK-8157524 was integrated.
21-07-2016

It seems that jarsigner tool also should be modified to support multiversion jars.
03-03-2015