JDK-8207162 : jdeps fails with multi release jars with classpath option
  • Type: Bug
  • Component: tools
  • Affected Version: 9,10.0.1,11
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2018-07-11
  • Updated: 2020-01-10
  • Resolved: 2020-01-10
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE PROBLEM :
jdeps fails when executing on a non multi release jar and the --class-path contains multi release jars.
The opposite is also true. 
jdeps fails when executing on a multi release jar with the appropriate --multi-release <version> flag is set and the --class-path contains non multi release jars.



Comments
JDK-8210502 has been fixed in JDK 12.
10-01-2020

This loos to be a dup of JDK-8210502. The fix for that issue has been in the JDK 12 EA builds for some time and would be good to test out to make sure that there aren't any other issues.
17-12-2018

There is no winning. jdeps can't be used if you have a mix of multi-release and non-multi-release jars. This effectively means that jdeps doesn't work in most cases, as some dependencies are likely to be multi-release (e.g. jaxb)
05-12-2018

Same effect using --module-path instead of -cp ``` [] ~/projects/bytelist $ cat src/module-info.java open module org.jruby.bytelist { requires org.jruby.jcodings; } [] ~/projects/bytelist $ cat ../jcodings/src/module-info.java open module org.jruby.jcodings { exports org.jcodings; exports org.jcodings.ascii; exports org.jcodings.constants; exports org.jcodings.exception; exports org.jcodings.specific; exports org.jcodings.spi; exports org.jcodings.transcode; exports org.jcodings.transcode.specific; exports org.jcodings.unicode; exports org.jcodings.util; } [] ~/projects/bytelist $ jdeps --module-path ../jcodings/target/jcodings.jar target/bytelist-2.0.0-SNAPSHOT.jar Error: jcodings.jar is a multi-release jar file but --multi-release option is not set [] ~/projects/bytelist $ jdeps --multi-release 9 --module-path ../jcodings/target/jcodings.jar target/bytelist-2.0.0-SNAPSHOT.jar Error: bytelist-2.0.0-SNAPSHOT.jar is not a multi-release jar file but --multi-release option is set ``` This basically makes multi-release jars unusable with modules.
07-09-2018

Verified and found jdeps is expecting jar file provided in classpath and jar file supplied to jdeps both should be multirelease jar (in case of either of them is multi-release jar) check below output where as multi.jar is multi-release jar file and spring-core-5.0.7.RELEASE.jar is not a multi-release jar file == -sh-4.2$ /scratch/fairoz/JAVA/jdk10.0.1/jdk-10.0.1_GA/bin/jdeps -cp ../9056007/spring-core-5.0.7.RELEASE.jar --multi-release 9 multi.jar Error: spring-core-5.0.7.RELEASE.jar is not a multi-release jar file but --multi-release option is set == similarly == -sh-4.2$ /scratch/fairoz/JAVA/jdk10.0.1/jdk-10.0.1_GA/bin/jdeps -cp ./multi.jar ../9056007/spring-core-5.0.7.RELEASE.jar Error: multi.jar is a multi-release jar file but --multi-release option is not set == This looks like issue
12-07-2018