openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment 18.3 (build 10.0.2+13)
OpenJDK 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
Aug 02, 2018 8:31:52 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-stable
* Branch: HEAD
* Git Hash: f85624a
* Build Date: 2018-01-21
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jme3.util.ReflectionAllocator (file:/C:/Users/oualid/.gradle/caches/modules-2/files-2.1/org.jmonkeyengine/jme3-core/3.2.1-stable/e291222f9a6d07e52daf99e8f3b9385ddabaf1ca/jme3-core-3.2.1-stable.jar) to method sun.nio.ch.DirectBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of com.jme3.util.ReflectionAllocator
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
Java10 is starting to clamp down on reflective access to private methods.
…If Java gave us a legitimate way to free memory then we wouldn’t need it in this case. Of course, other parts of the engine (like SpiderMonkey serialization) still would.
Someone who cares more than I do right now should look into if there is a switch that can turn off this check.
I’m more concerned about the day a switch isn’t enough anymore and we’re stuck on java <10 or something.
Since it’s currently only a warning, it’s fine as it is I guess, but we should have a workaround at hand sooner or later
Tons of reflection code all over the world will break if there is not an exception to this. There will always be some way to disable it on desktop, I guess.
and… anyway what LWJGL or JOGL got to do with this. the class that causes this warning don’t use anything besides Java lang and nio packages, so LWJGL got nothing to do with this.
no, LWJGL3 provides another implementation of BufferAllocator which doesn’t use Reflection API. You need to change your dependencies to use lwjgl3 as back-end.