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

java -jar T3.jar does not find classes listed in Class-Path manifest attribute

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2
    • None
    • 1.2.0
    • core-libs

    Description


      arthur.frechette@East 1998-05-04

      BUG2
      ----

      Prob: java -jar T3.jar does not find classes in jars listed in Class-Path
            manifest attribute. This is a test regression.

      Test Information
      ----------------
      Baselevel: java full version "JDK-1.2beta4-D"
      Platform: Solaris 2.6
      Test Suite: javax test suite
      Test Case: javax/tests/dwn/T3

      Executing: make run
                      java -jar T3.jar

      Returns the following:
      Exception in thread "main" java.lang.NoClassDefFoundError: util/TestUtil
              at
              at T3.main(T3.java:19)
      *** Error code 1
      make: Fatal error: Command failed for target `run'

      The manifest file
      -----------------
      Manifest-Version: 1.0
      Main-Class: T3
      Class-Path: ../../../ext/e1/e1.jar ../../../ext/e6/e6.jar ../../../ext/e7/e7.jar ../../../ext/util/util.jar

      The ../ in the path use to work before and now is no longer working.

      ------------------------------------

      When I changed the manifest file to:

      The manifest file
      -----------------
      Manifest-Version: 1.0
      Main-Class: T3
      Class-Path: ext/e1/e1.jar ext/e6/e6.jar ext/e7/e7.jar ext/util/util.jar

      And I copied the jars relative to T3 test directory as follows:
                      cp ../../../ext .

      Upon execution again I received the following:

      Executing: make run
                      java -jar T3.jar
                            
      No 'Main-Class' attribute found or JAR file does not exist: T3.jar
      *** Error code 1
      make: Fatal error: Command failed for target `run'
       
      ------------------------------------
       
      Next I attempted to execute as follows:
       
      Executing: java -Djava.class.path=T3.jar T3
       
      And the test ran fine.
       
      ===============================================================
      T3 test cases [APPLICATION/DOWNLOADED EXTENSIONS Multiple JARs]
      ===============================================================
          T3:(test0) ... test package sealed for [pkgs.one.A]
          T3:(test1) ... test package not sealed for [pkgs.two.B]
          T3:(test2) ... test package sealed for [sqe.three.Y]
          T3:(test3) ... test package sealed for [sqa.four.Z]
      --------------------------------------------------------------------------------Begin executing test T3:(test0) .....
      Test package sealed [DOWNLOADED EXTENSIONS Multiple JARs]
      Create instance of class pkgs.one.A - sealed
      A=(pkgs.one.A:sealed)
      A ClassLoader=sun.misc.Launcher$AppClassLoader@c19fba37
      Verify package sealed
      T3:(test0) ..... PASSED
      Done executing test T3:(test0) .....
      --------------------------------------------------------------------------------Begin executing test T3:(test1) .....
      Test package not sealed [DOWNLOADED EXTENSIONS Multiple JARs]
      Create instance of class pkgs.two.B - not sealed
      B=(pkgs.two.B:not sealed)
      B ClassLoader=sun.misc.Launcher$AppClassLoader@c19fba37
      Verify package sealed
      T3:(test1) ..... PASSED
      Done executing test T3:(test1) .....
      --------------------------------------------------------------------------------Begin executing test T3:(test2) .....
      Test package sealed [DOWNLOADED EXTENSIONS Multiple JARs]
      Create instance of class sqe.three.Y - sealed
      Y=(sqe.three.Y:sealed)
      Y ClassLoader=sun.misc.Launcher$AppClassLoader@c19fba37
      Verify package sealed
      T3:(test2) ..... PASSED
      Done executing test T3:(test2) .....
      --------------------------------------------------------------------------------Begin executing test T3:(test3) .....
      Test package sealed [DOWNLOADED EXTENSIONS Multiple JARs]
      Create instance of class sqa.four.Z - sealed
      Z=(sqa.four.Z:sealed)
      Z ClassLoader=sun.misc.Launcher$AppClassLoader@c19fba37
      Verify package sealed
      T3:(test3) ..... PASSED
      Done executing test T3:(test3) .....
      --------------------------------------------------------------------------------***** -------------------
      ***** Test Result Summary
      ***** -------------------
      ***** T3:(test0) . . . . . . . . PASSED
      ***** T3:(test1) . . . . . . . . PASSED
      ***** T3:(test2) . . . . . . . . PASSED
      ***** T3:(test3) . . . . . . . . PASSED
      ***** T3 . . . . . . . . PASSED
      *****************************************


      You must bring over the latest version of the javax test suite.

      bringover -p /net/labzap.east/files7/JDK_tests/JDK1.2/javax -w $HOME/workspaces/javax .

      This test use to pass in a previous build

      Attachments

        Issue Links

          Activity

            People

              dconnellsunw David Connelly (Inactive)
              afrechet Art Frechette (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: