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

Improve error reporting for compiling against unexported package

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • tools
    • b144
    • Verified

      Currently if code is compiled against unexported package following error is reported
      javac -d modules --module-path modules --module-source-path src src/m2/pkg2/B.java
      src\m2\pkg2\B.java:1: error: package pkg1 does not exist
      package pkg2; /** Klass B */ public class B { /** Field f */ public pkg1.A f; }

      Can javac report something like "pkg1 is not exported by module m1"?

            jlahoda Jan Lahoda
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: