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

Regression: getResourceAsStream cannot access a resource inside a jar file that has spaces in path

XMLWordPrintable

    • b02
    • generic, x86
    • generic, solaris_10

        With JDK1.4.2_12 and higher release, we are seeing some unique problem for getResourceAsStream method. The issue is if one has a resource inside a jar file has spaces in the path we cannot access that resource. As seen in the attached example I have tried two methods and both of them have failed to yield any results. I have attached source code and other required jar file for your testing.

        (See attached files: TestClassLoader.class, TestClassLoader.java and test.jar)

        Command to run the test

        java -classpath .;test.jar TestClassLoader

        This issue is not present with 1.4.2_11, 1.5.0_10 AND 1.6.0

              coffeys Sean Coffey
              rverabel Raghu Verabelli (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: