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

Confusing error while compiling with not existing module source path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 9, 9-repo-jigsaw
    • tools

      To reproduce create class D in package p
      "package p; public class D { }"
      and run
      $javac -d classes -modulesourcepath not_exist p/D.java

      p\D.java:1: error: unnamed package is not allowed in named modules
      package p; public class D { }
      ^
      1 error

            jjg Jonathan Gibbons
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: