Release Note: Requirements of an Agent's premain Method Changed to Conform to the Specification

XMLWordPrintable

      The `java.lang.instrument` implementation has been changed in this release to require that agent `premain` and `agentmain` methods are public. The specification has always required this, but it was not enforced. Attempting to run with an agent where these methods are not public will fail with an exception such as:

      `java.lang.IllegalAccessException: method <fully-qualified-class-name>.premain must be declared public`.

      A related change in this release is that the `premain` and `agentmain` methods must be defined in the agent class. The implementation no longer searches for these methods in superclasses.



            Assignee:
            Serguei Spitsyn
            Reporter:
            Marty Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: