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

javac does not detect split packages between classpath and system image

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3
    • tbd
    • 9, 10, 11, 12, 13
    • tools
    • None

    Description

      See the mail thread beginning here:
      http://mail.openjdk.java.net/pipermail/jigsaw-dev/2018-December/014076.html
      and reference on StackOverflow:
      https://stackoverflow.com/q/51094274/4611488

      Extract from initial post:
      -------
      The question can be simplified like this:
      //---
      import javax.xml.transform.Transformer;

      public class Test {
          Transformer transformer;
      }
      //---

      Which of the following compiler invocations should accept / reject the program:

      $ javac Test.java
      $ javac -classpath xml-apis-1.4.01.jar Test.java
      $ javac -classpath xml-apis-1.4.01.jar --limit-modules=java.base,java.xml Test.java
      $ javac -classpath xml-apis-1.4.01.jar --limit-modules=java.base Test.java :
      -------

      Extract of response from [~abuckley]
       
      -------
      I agree that only the first and last invocations should succeed.

      tl;dr A package split between the classpath and the system image is just as bad as a package split between two modules on the modulepath.
      -------

      See attached test.

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: