Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jdeps command use with `--multi-release` option failed

I ran the followings commands, but I got the same errors:

$ jdeps --generate-module-info . --multi-release 9 libs/log4j-core-2.11.1.jar
Error: log4j-core-2.11.1.jar is a multi-release jar file but --multi-release option is not set

$ jdeps --generate-module-info . --multi-release 10 libs/log4j-core-2.11.1.jar
Error: log4j-core-2.11.1.jar is a multi-release jar file but --multi-release option is not set

$ jdeps --generate-module-info . --multi-release 11 libs/log4j-core-2.11.1.jar
Error: log4j-core-2.11.1.jar is a multi-release jar file but --multi-release option is not set

$ jdeps --generate-module-info . libs/log4j-core-2.11.1.jar
Error: log4j-core-2.11.1.jar is a multi-release jar file but --multi-release option is not set

What's the problem with the above commands?

Follow others commands about my environment:

$ java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

$ javac --version
javac 10.0.2

$ jdeps --version
10.0.2

Same error with the java-11-oracle.

like image 716
Fabrício Pereira Avatar asked Jan 27 '23 02:01

Fabrício Pereira


1 Answers

There's a bug with --multi-release option to work with modules

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 flag is set and the --class-path contains non multi release jars.

Which summarizes the issue:

This basically makes multi-release jars unusable with modules.

like image 80
user7294900 Avatar answered Jan 31 '23 10:01

user7294900