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

win32 JVM doesn't distinguish case of class names

XMLWordPrintable

    • b01
    • generic, x86
    • generic, windows_95
    • Not verified



        Name: laC46010 Date: 03/25/97



        JDK1.1.1E VM fails to pass the following JCK test on win32 platforms:

        vm/jni/FindClass/fncl001/fncl00103/fncl00103

        The failure is caused by JVM's inability to distinguish
        lower and upper cases in class names. Particularly,
        when Java program needs to load class "A", JVM successfully
        loads class "a" instead.

        The following script (see java sources below):

          # JAVA variable denotes JDK1.1.1E
          JAVA=h:/ld13/java/dest/jdk1.1.1e/win32/bin/
          $JAVA/javac -d . aupper.java
          $JAVA/javac -d . test.java
          $JAVA/java -verify p.test
          $JAVA/javac -d . alower.java
          $JAVA/java -verify p.test

        on win32 produces the following output:

        A uppercase name class.
        a lowercase name class.


        which means that when we substitute class 'A' with class 'a',
        test.class still can find 'A' class and successfully execute
        its method 'm'.


        --------------------- aupper.java ---------------------
        package p;

        class A {
        void m() {
        System.out.println("A uppercase name class.");
        }
        }

        --------------------- alower.java ---------------------
        package p;


        class a {
        void m() {
        System.out.println("a lowercase name class.");
        }
        }

        --------------------- test.java ---------------------
        package p;

        public class test {
        public static void main (String[] arg) {
        A obj = new A();
        obj.m();
        }
        }
        -----------------------------------------------------

        ======================================================================

              dconnellsunw David Connelly (Inactive)
              leosunw Leo Leo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: