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

JAVAX: Regression: URLClassLoader fails to find resources in all cases.

    XMLWordPrintable

Details

    • 1.2beta3
    • sparc
    • solaris_2.6
    • Not verified

    Description

      JAVAX: URLClassLoader fails to find resources in all cases.

      Most of the test cases below were working in the G build and are now
      broken.

      URLClassLoader fails to find resources for INSTALLED and DOWNLOADED
      extensions. It is broken.

      The URLClassLoader does not retrieve resources such as image or
      audio files via its URLClassLoader.getResource() method call in
      all cases. The cases I am talking about include resources:

      (1) Contained in the same JAR as the TEST CLASS code.
      (2) Contained in directories specified in the Class-Path of the
          manifest file.
      (3) Contained in JARs specified in the Class-Path of the manifest
          file.

      The test cases below use in some case the "java" interpreter and in
      other cases the "appletviewer".

      The test cases are:

      tests/ins/T10 /* Fails to get resource in same JAR as TEST CLASS code */
      tests/ins/T11 /* Fails to get resource in same JAR as TEST CLASS code */
      tests/ins/T13 /* Fails to get resources from installed JARs */
      tests/ins/T13b /* Fails to get resources from installed JARs */

      tests/dwn/T10 /* Fails to get resource in same JAR as TEST CLASS code */
      tests/dwn/T11 /* Fails to get resource in same JAR as TEST CLASS code */
      tests/dwn/T12 /* Fails to get resources from directories specified in */
      /* Class-Path */
      tests/dwn/T12b /* Fails to get resources from directories specified in */
      /* Class-Path */
      tests/dwn/T13 /* Fails to get resources from JARs specified in */
      /* Class-Path */
      tests/dwn/T13b /* Fails to get resources from JARs specified in */
      /* Class-Path */

      The URLClassLoader should be able to retreive the URL to the image and
      audio resources by calling its URLClassLoader.getResource() method.

      URL url = URLClassLoader.getResource("images/sunlogo.gif")

      url returned is null in all cases

      URL url = URLClassLoader.getResource("audio/spacemusic.au")

      url returned is null in all cases

      To get, build, and run the JAVAX Test Suite follow the following
      instructions:

      ===================================================================
      Here are the instructions for getting, building, and running the
      JAVAX Test Suite.

      IMPORTANT NOTE: This test suite currently works only on SOLARIS.
      ===================================================================

      (1) Bring Over the JAVAX Test Suite from the workspace at:

      % mkdir -p $HOME/workspaces/javax
      % bringover -p /js/files7/JDK_tests/JDK1.2/javax -w $HOME/workspaces/javax .

      (2) Change to the javax directory and source the correct "setup.???"
          script. I am assuming the "csh".

          Before you source the "setup.???" script you may have to edit it
          to make some changes. For instance the JAVAX_JDKHOME environment
          variable may have to be reset because your directory location for
          the JDK1.2 latest source may be in a different place. Also the
          JAVAX_WEBSERVER_HOST and JAVAX_WEBSERVER_PORT may have to change.
          
      % cd $HOME/workspaces/javax
      % source setup.csh

      (3) Build the JAVAX Test Suite. This will take a while. It builds all
          the components, libraries, tests, and JARs.

      % make all

      (4) To run the DOWNLOADED EXTENSION tests do the following:

      % cd tests/dwn
      % runall

          Results are placed in the results directory. I am assuming a
          solaris run.

      % more results/solaris/runall.logfile /* DETAIL results */
      % more results/solaris/runall.failures /* FAILURES */
      % more results/solaris/runall.summary /* SUMMARY */

          To run individual tests which is what I recommend for now do the
          following:

      % cd tests/dwn
      % ls # List directory of all the tests (T*)
      % cd T10
      % make run

      Each test has a simple README file which describes a little
      bit about the test.

      % more README

      (5) To run the INSTALLED EXTENSION tests do the following:

      % cd tests/ins
      % runall

          Results are placed in the results directory. I am assuming a
          solaris run.

      % more results/solaris/runall.logfile /* DETAIL results */
      % more results/solaris/runall.failures /* FAILURES */
      % more results/solaris/runall.summary /* SUMMARY */

          To run individual tests which is what I recommend for now do the
          following:

      % cd tests/ins
      % ls # List directory of all the tests (T*)
      % cd T10
      % make run

      Each test has a simple README file which describes a little
      bit about the test.

      % more README

      (6) Any questions call (Art, Liz, or Al).

          Tom Kincaid /* JAVASOFT EAST QA Manager */
          Arthur Frechette /* JAVAX Test Developer */
          Liz Blair /* JAVAX Project Leader/Test Developer */
          Alan Frechette /* JAVAX Test Developer */

      Attachments

        Activity

          People

            brenaudsunw Benjamin Renaud (Inactive)
            aefreche Alan Frechette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: