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

[TESTBUG] Remove dependency of sun.tools.jar from RedefineClassHelper

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      svc
    • Resolved In Build:
      b02

      Description

      The internal sun.tools.jar package is used here which leads to javac warning
      http://hg.openjdk.java.net/jdk/jdk/file/241659594595/test/lib/RedefineClassHelper.java#l66

      warning: sun.tools.jar.Main is internal proprietary API and may be removed in a future release

      This can be avoided by using test/lib/ClassFileInstaller.java

          public static void main(String[] args) throws Exception {
              String manifest = "Premain-Class: RedefineClassHelper\nCan-Redefine-Classes: true\n";
              ClassFileInstaller.writeJar("redefineagent.jar", ClassFileInstaller.Manifest.fromString(manifest), "RedefineClassHelper");
          }


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iklam Ioi Lam
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: