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

Changing "requires" to "requires static" in an application module results in build failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 10
    • infrastructure
    • None
    • b33
    • generic
    • generic

      I wanted to try "requires static" (optional dependency) from jdk.scripting.nashorn.shell module to java.compiler module.

      Diff for module-info.java:

      diff -r a2008587c13f src/jdk.scripting.nashorn.shell/share/classes/module-info.java
      --- a/src/jdk.scripting.nashorn.shell/share/classes/module-info.java Thu Nov 16 00:58:50 2017 +0100
      +++ b/src/jdk.scripting.nashorn.shell/share/classes/module-info.java Thu Nov 16 19:44:13 2017 +0530
      @@ -38,7 +38,7 @@
        * @since 9
        */
       module jdk.scripting.nashorn.shell {
      - requires java.compiler;
      + requires static java.compiler;
           requires jdk.internal.le;
           requires jdk.scripting.nashorn;
           requires jdk.internal.ed;


      With that change, "make images" target fails.

            erikj Erik Joelsson
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: