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

'#' in path breaks the search algorith for classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.2.0, 1.2.1, 1.2.2
    • core-libs
    • generic, x86
    • generic, solaris_2.6, windows_nt



      Name: krT82822 Date: 08/10/99


      When I save .class files in a directory which
      has a '#' in its name, the classloader doesn't
      find the classes. This works with every java programm.
      Here is a script of a CMD.EXE session. It shows
      a java programm which runs perfect ... but when
      you rename the directory the class file is stored
      in to something containing a '#' the program stops
      running. BTW: Classpath variable is not set, test class
      is in the default package.

      ------------------------------------------------------
      D:\chris\java\src>set CLASSPATH
      Die Umgebungsvariable CLASSPATH ist nicht definiert.

      D:\chris\java\src>java -version
      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads, symcjit)

      D:\chris\java\src>dir /B TT.*
      TT.class
      TT.java

      D:\chris\java\src>java TT
      Hello World, I am TT


      D:\chris\java\src>cd ..

      D:\chris\java>rename src src#ddd

      D:\chris\java>cd src#ddd

      D:\chris\java\src#ddd>java TT
      java.lang.NoClassDefFoundError: TT
      Exception in thread "main"
      D:\chris\java\src#ddd>type TT.java

      public class TT {
        public static void main(String args[]) {
          System.out.println("Hello World, I am TT\n");
        }
      }
      -----------------------------------------------------------
      (Review ID: 93389)
      ======================================================================

            zlisunw Zhenghua Li (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: