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

NoClassDefFoundError if '#' anywhere in path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta
    • sparc
    • solaris_8
    • Verified


      If a "#" exists in any element of the classpath (as an absolute path)
      then those classpath elements are unreachable, leading to NoClassDefFoundError.

      Create a directory /tmp/a#b.

      Create a trivial java program:

      public class Hello {
      public static void main(String[] args) {
      System.out.println("Hello");
      }
      }

      # cd /tmp/a#b
      # javac Hello.java
      # jar cf Hello.jar Hello.class

      Case 1:

      # java Hello
      Exception in thread "main" java.lang.NoClassDefFoundError: Hello

      Case 2:

      # java -classpath Hello.jar Hello
      Exception in thread "main" java.lang.NoClassDefFoundError: Hello


      This problem occurs with Merlin build b25.

            mmcclosksunw Michael Mccloskey (Inactive)
            foliversunw Fred Oliver (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: