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

Volker Simonis volker.simonis at gmail.com
Fri May 19 18:39:07 UTC 2017


Hi,

without judging any of the proposals in this thread, I just want to
clarify some things:

 - jlink is no standard tool (i.e. it is neither specified nor
mandated by the new Java SE 9 specification). This equally applies to
the new jimage/jmod file formats.
- in contrast, the minimal, compact and full profiles have been
specified by the Java SE 8 specification.
- the new Java SE 9 specification defines the JPMS together with a set
of standard modules and their relation (i.e. dependencies). An
implementation of the Java SE 9 specification now only has to
implement the "java.base" module. This is a fundamental change
compared to previous versions of the specification (excluding maybe
only the three profiles in Java SE 8) where Java SE always meant "all
of Java SE or nothing".
- implementations can further choose to implement an arbitrary "closed
subset"  of the standard modules defined by Java SE 9. See [1] for a
draft of the gory details and the mail threads at [2,3] for recently
proposed corrections.
- this is all very complicated (technically and from a licensing point
of view) because users can not rely on what will be in a Java 9
distribution any more. If they use Oracle/OpenJDK, they can at least
use "--list-modules" to get all the observable modules their Java
distribution contains. But bear in mind that "--list-modules" is an
Oracle/OpenJDK option and not specified and mandated by the standard.
- in general, most (if not all) of the command line options are
implementation dependent. In the context of command line options
"Standard Options" means "Standard Oracle/OpenJDK" options, not
options specified by any Java standard.
- think of the current problems many people have with the distinction
of JDK vs. JRE (e.g. tools,jar, etc). This confusion will multiply
with the new Java 9 modular images.

I'm afraid, all that won't help you Rafael (and I'm sorry for that!).
So why did I wrote all that? I think I just wanted to emphasize the
following points:

 - We need good/better standards (and that's why the JCP is so important)!
 - With great power comes great responsibility (i.e. as a
Java/application provider, use JPMS/jlink wisely)!
 - As a Java user, insist on getting a "full" JDK (i.e. one which
contains the java.se/java.se.ee module)!

Regards,
Volker

[1] http://cr.openjdk.java.net/~iris/se/9/java-se-9-pr-spec-02/java-se-9-spec.html#s7
[2] http://mail.openjdk.java.net/pipermail/java-se-9-spec-experts/2017-May/000020.html
[3] http://mail.openjdk.java.net/pipermail/java-se-9-spec-experts/2017-April/thread.html


On Fri, May 19, 2017 at 6:02 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 19/05/2017 16:42, Christoph Engelbert wrote:
>
>> Hey,
>>
>> Just a clarification question, does that mean no agent like dynatrace,
>> appdynamics or others would work anymore with a normal jlinked image, when
>> `java.instrument` is specifically added as a dependency?
>>
>>
> Just to avoid any confusion here: The Oracle JDK downloads include all
> modules, also the server VM with JVM TI. So there shouldn't be any issues.
> Same thing for anyone building from the OpenJDK sources.
>
> The issue that we discussing here is runtime images created with the `jlink`
> tool. It's up to the user of `jlink` as to which modules to include and also
> the VM variants to include. If the user specifies `java.instrument` to jlink
> then it will be linked in and should just work.
>
> -Alan.


More information about the jigsaw-dev mailing list