Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8174740

RuntimeException: Module m's descriptor returns inconsistent package set

XMLWordPrintable

    • b157
    • Verified

        The bug arises when a module has a concealed package but it doesn't have the ModulePackages class file attribute. Here's a quick example with an exploded module, it also happens with modular JARs.

        mkdir -p src/m/p src/m/q
        cat > src/m/module-info.java << EOF
        module m { exports p; }
        EOF
        cat > src/m/p/C.java << EOF
        package p;
        class C { }
        EOF
        cat > src/m/q/C.java << EOF
        package q;
        class C { }
        EOF
        mkdir -p mods/m
        javac -d mods/m $(find src -name "*.java")
        java -p mods --list-modules m
        jlink --module-path $JAVA_HOME/jmods:mods --add-modules m --output myimage

              mchung Mandy Chung (Inactive)
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: