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

javac sensitive to case of zipfiles in CLASSPATH

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.3.1
    • 1.3.0
    • tools
    • rc1
    • generic, x86
    • generic, windows_nt



        Name: md23716 Date: 01/11/2001

        In the 1.3 javac, a zipfile specified in the CLASSPATH is case-sensitive.
        This is not the case with 1.2.2.

        For example:

        A.java:
            public class A ();

        B.java:
            public class B extends A {};

            > javac B.java /* assumes "." is in CLASSPATH */
            > ls
            A.class A.java B.class B.java

            > zip -r a.zip A.class
            adding: A.class (deflated 16%)

            > rm A.class A.java /* be sure to do this */
            > ls
            B.class B.java a.zip

            > set CLASSPATH=a.zip /* notice case of filename matches */
            > javac B.java /* works OK */
            > set CLASSPATH=A.ZIP /* change case of filename! */

            > javac -verbose B.java
            B.java:1: cannot resolve symbol
            symbol : class A
            location: class B
            public class B extends A {};
            ^
            1 error

            /* BUT - 'java' can still find A */
            > java A
            Exception in thread "main" java.lang.NoSuchMethodError: main

        I can't find anywhere that documents this change in behaviour between
        1.2.2 and 1.3.

        We have many scripts that set CLASSPATH to a zipfile name that does not
        exactly match the filename in Win32, because on theis platform, case
        is irrelevant.
        ======================================================================

              gafter Neal Gafter (Inactive)
              mdevereuorcl Michelle Devereux (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: