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

[TESTBUG] Enhance test/testlibrary/ClassFileInstaller.java to support JAR files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • hotspot
    • None
    • b115

      Many hotspot tests need to create JAR files. The current method is messy:

      [1] Because JTREG compiles .class files into various directories, we need to use ClassFileInstaller to find the .class file and copy it into the current directory.
      [2] Then, there are various ad-hoc calls to sun.tools.jar.Main to create the JAR file. This is not desirable because sun.tools.jar is an internal package and javac gives warnings about it.

      We should enhance ClassFileInstaller so that JAR files can be easily created using JTREG tags:

       * @build ClassFileInstaller sun.hotspot.WhiteBox
       * @run main ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox

      To handle more complex use cases, new APIs are also added to ClassFileInstaller for programmatically creating JAR files inside the test source code.
       

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: