RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

Alan Snyder javalists at cbfiddle.com
Fri Apr 23 19:57:53 UTC 2021

On Apr 21, 2021, at 11:40 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> Sure, if you are using native code then you have the full power of JVM TI and JNI available. Project Panama is exploring how to restrict access to native code, I think too early to say how this might extend to JNI.

I looked at some of the Panama documents and saw no hint that it might be extended to JNI. It seems to be positioned as an (partial) alternative to JNI.

What I do see is that native code has no direct access to the JDK via Panama, only the ability to invoke provided upcalls, which can only access objects and methods that the caller has access to. That is indeed much more restricted than JNI.

Even though it is “too early”, can you explain why you think Panama’s restrictions might apply to JNI?

As a library developer, I have often made use of JNI to work around limitations in current and older JDKs. I would hate to lose that ability.


More information about the core-libs-dev mailing list