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

MODULE_MODE: javac ignores module-info requires options

XMLWordPrintable

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: