JMC with Static Portable JRE 11
Erik Gahlin
erik.gahlin at oracle.com
Wed Nov 20 18:51:02 UTC 2019
The jdk.attach module is needed if you want to discover another Java
process.
Erik
On 2019-11-20 19:44, Mario Torre wrote:
> The API for jdk.management is new, and also all the others were before
> accessible through the tools.jar if I recall correctly, since by
> default the jre has been replaced with the modular jdk it's possible
> our scripts omit some libraries? If I remember correctly Jiri said
> that the jre is created "manually", perhaps some of the API that's
> supposed to be included isn't and it's only found in the full jvm.
>
> You should be able to check this by grepping for "jdk.management" in
> the binary tree and see the difference between the two builds.
>
> Cheers,
> Mario
>
>
> On Wed, Nov 20, 2019 at 7:17 PM Jie Kang <jkang at redhat.com> wrote:
>> Hey Alex, Mario,
>>
>> I just wanted to give a quick status update to clarify that I am going
>> to get to the bottom of this.
>>
>> I tried to run JMC with the static JRE 11 build on Linux and got the
>> same issue with being unable to see JVMs on the system. JMC on launch
>> warns:
>>
>> WARNING: Unknown module: jdk.management.agent specified to --add-exports
>> WARNING: Unknown module: jdk.attach specified to --add-exports
>> WARNING: Unknown module: jdk.internal.jvmstat specified to --add-exports
>> WARNING: Unknown module: jdk.attach specified to --add-opens
>>
>> I am assuming these are needed for the JVM discovery mechanism. I will
>> see how the static builds are made in openjdk. Maybe there's an
>> alternative API that the JRE 11+ provides that JMC can use instead?
>> Otherwise we can conclude that JMC will not have discovery capability
>> with JRE 11, similar to before modules were introduced. In this
>> situation it can still be used with JRE to open and analyze JFR files
>> on disk.
>>
>>
>> Regards,
>> Jie Kang
>>
>
> --
> Mario Torre
> Associate Manager, Software Engineering
> Red Hat GmbH <https://www.redhat.com>
> 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898
>
More information about the jmc-dev
mailing list