Search code examples
javajarjava-9java-modulejava-platform-module-system

List modules in jar file


I've created what I'm pretty sure is a modular jar file. But if possible, I'd like to double check. Given a jar file, is there a way to determine what modules the compiler would find within it?


Solution

  • The alternative is to use the jar --describe-module (-d for short), e.g.:

    jar --file=myjar.jar --describe-module