JMC with Static Portable JRE 11

Mario Torre neugens at redhat.com
Wed Nov 20 18:57:34 UTC 2019


Hi Erik,

Yes, the question is why this API isn't it there in those static
builds. I assume Jie meant the OpenJDK JRE build that we ship in
Fedora - I'm not entirely sure but I think we still have the
possibility to install a minimal jre there and Jie was debugging why
JMC isn't working on those. In fact, I think he didn't mean to send
this to jmc-dev since this is a packaging question ;)

Cheers,
Mario

On Wed, Nov 20, 2019 at 7:51 PM Erik Gahlin <erik.gahlin at oracle.com> wrote:
>
> 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
> >
>


-- 
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