Java agent premain and agentmain methods must be
public in Java SE 17. This was always required by the specification, but was
not previously enforced. In addition, premain and
agentmain methods must be defined in the agent class, they cannot be
defined in a superclass.
This rule has a quick fix that sets the visibility of premain and
agentmain methods to public.
For more information on these changes, see Requirements of an Agent's premain Method Changed to Conform to the Specification.