Disallowing the dynamic loading of agents by default (revised)
michael.rasmussen at zeroturnaround.com
Wed Apr 5 17:00:13 UTC 2017
On 5 April 2017 at 19:15, <mark.reinhold at oracle.com> wrote:
> - Enhance the `-jar` launcher option so that if the JAR file being
> launched contains a `Premain-Class` attribute then it's launched
> as both an application and as an agent for that application.
> This will allow `java -jar foo.jar` to be used in place of the
> more verbose `java -javaagent:foo.jar -jar foo.jar` .
I would propose the presence of an addition option in the manifest to
enable/control this behavior.
In the case of standalone agents, running them as -jar are sometimes
used for a different purpose than running them as agents.
For instance, in the case of JRebel, java -jar jrebel.jar is used for
license activation/control, and should not activate the agent part.
JRebel, Product Manager
More information about the jigsaw-dev