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

javac does not find packages in additional zip files.

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5
    • Verification:
      Not verified

      Backports

        Description


        Create a class file within a package, such as:

        xxx/xyzzy.java:

        package xxx;

        public class xyzzy{

        public xyzzy(){
           System.out.println("Xyzzy");
        }
        }

        now zip this directory into a zip file and add the full path name to CLASSPATH.
        Do not put the directory entries into the zip file.

        Now try compiling another java file which contains the line:

            import xxx.*;

        This fails with the error:

            Package xxx not found in import.

        This bug does not occur if CLASSPATH is set to the directory containing the class files. Also,
        if the import statment explictly imports xxx.xyzzy the zip file works. The runtime
        also can load the zip file correctly.
        Also, if the zipfile includes the directory entries, javac finds the class file.
        I have reproduced this here and have an example of this set up.


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  nsaraiyasunw Nakul Saraiya (Inactive)
                  Reporter:
                  tonywyant Tony Wyant (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: