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

MODULE_MODE: javac ignores module-info requires options

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Not an Issue
    • Affects Version/s: 9-repo-jigsaw
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      The following module is compiled fine while as it should not because no "requires jdk.desktop" is specified.

      ===== src/module-info.java =====
      module test_completeness @ 1.0 {
        requires jdk.base;

        class test.completeness.desktop.Desktop;
      }


      ===== src/test/completeness/desktop/Desktop.java =====
      package test.completeness.desktop;

      public class Desktop {
         public static void main(String[] args) {
            System.out.println("Hey");

            { javax.swing.SpringLayout.Constraints obj; }
         }
      }

      =====
      Then I compile it and run as
      > ${JAVA_HOME}/bin/javac -d modules -modulepath modules -sourcepath src `find src/ -name *.java`
      > ${JAVA_HOME}/bin/jmod install modules/src/ -L mlib test_completeness
      > ${JAVA_HOME}/bin/java -L mlib -m test_completeness

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              epavlova Ekaterina Pavlova
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: