Attaching to a JVM image that does not include java.instrument

Alan Bateman Alan.Bateman at
Fri May 19 10:24:43 UTC 2017

On 19/05/2017 10:20, Rafael Winterhalter wrote:

> :
> It is the exact purpose of a Java agent to allow the enhancement of a 
> Java application that is independent of a particular Java process. 
> Therefore, it should not be a decission bound to the creation or 
> bundeling of the Java application if such user-site monitoring is 
> required. Instead, it should always be possible to attach a Java agent 
> for a standalone Java process. Also, I cannot find any comment about 
> the Java agent functionality to be optional despite the mentioned 
> change set: 
> - Neither would anybody using the functionality expect it to be 
> optional. I work with agents everyday and this is the first time I 
> hear it.
I don't have time to debate this topic just now but just on optionally, 
the tool interfaces have always been optional. It might need digging to 
find all the history but as I recall, in 2004 the then in-progress 
JSR-163 spec was clarified to make the optionality clear. This is why 
the JVM TI spec has the statement "JVM TI may not be available in all 
implementations of the JavaTM virtual machine". The wording in the 
java.lang.instrument package description wasn't as clear, something that 
came to light when shaking out the details of Compact Profiles for Java 
SE 8. This lead to a small clarification [1] that I mentioned.



More information about the jigsaw-dev mailing list