jbellis/jamm

can i use this in jdk 11

Closed this issue · 2 comments

Unsafe.objectFieldOffset in MemoryLayoutSpecification

Yes, but you'll get these warnings the first time you use the library:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.github.jamm.MemoryMeter (file:/private/var/folders/4c/zknv2yfd7xzf8kw7m5nzdmhc0000gn/T/jamm11165273543277800685.jar) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of org.github.jamm.MemoryMeter
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

Note: this was produced on OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode) and OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode) on macOS.

blerer commented

We just pushed some changes to support java version up to java 17. Nevertheless, in some situation you can get that type of warnings due to how the Java Module System works with some Java versions.