Using JOL with JDK 9+181

Aleksey Shipilev shade at redhat.com
Fri Sep 22 18:23:51 UTC 2017


On 09/22/2017 07:22 PM, Dmitry Vyazelenko wrote:
> BTW, I'm still getting these warning while building JOL:
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.openjdk.jol.info.ClassLayoutPrivatesTest
> # WARNING: Unable to get Instrumentation. Dynamic Attach failed. You may add this JAR as -javaagent
> manually, or supply -Djdk.attach.allowAttachSelf
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.openjdk.jol.util.ObjectUtils
> (file:/home/dmitry/projects/oss/jol/jol-core/target/classes/) to field java.lang.Class.cachedConstructor
> WARNING: Please consider reporting this to the maintainers of org.openjdk.jol.util.ObjectUtils
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release

Yes, that's a legit failure when JOL tries to poll fields with Reflection. It is expected to produce
warnings like that.

-Aleksey



More information about the jol-dev mailing list