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

Class.getResource(String) does not load resources that start with /.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.3.0
    • core-libs


      Resources whose names begin with / are supposed to be loadable with no name change.
      The method java.lang.Class.getResource(String), however, always returns a null URL
      when fed such a name.

      Source code, resource file, policy file, and script are attached.

      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-beta)
      Java HotSpot(TM) Client VM (build 1.3-beta, mixed mode)
      /net/ultraowl.eng/export/ultraowl2/ajacobs/runTonga/server/algol/kestrel_regression/ajacobs.Solaris.sparc/BogusContentTypeTest/test.html
      null <========================================
      test.html
      file:/net/ultraowl.eng/export/ultraowl2/ajacobs/runTonga/server/algol/kestrel_regression/ajacobs.Solaris.sparc/BogusContentTypeTest/mypak/test.html
      ./test.html
      file:/net/ultraowl.eng/export/ultraowl2/ajacobs/runTonga/server/algol/kestrel_regression/ajacobs.Solaris.sparc/BogusContentTypeTest/mypak/test.html

      allan.jacobs@Eng 2000-05-30

      Prevents a fix for the test
      kestrel_regression/test/javax/swing/JEditorPane/BogusContentTypeTest/BogusContentTypeTest.java

      allan.jacobs@Eng 2000-05-30

            mr Mark Reinhold
            ajacobssunw Allan Jacobs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: