LWJGL / lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
https://www.lwjgl.org
BSD 3-Clause "New" or "Revised" License
4.67k stars 631 forks source link

Unsupported JNI version detected #814

Closed TheChocolateOre closed 1 year ago

TheChocolateOre commented 1 year ago

Version

3.3.1

Platform

Windows x64

JDK

Oracle OpenJDK 19

Module

LWJGL core

Bug description

I'm getting a warning when running a LWJGL3-using app with Java 19 previews enabled (does not happen on 18). There is no crash, and business logic remains intact, still the warning might be of concern.

Of course, Java 19 was just released, so it's expected to encounter a few warnings. Nevertheless, I will give in to my year-long temptation and bring up Project Panama. Java 19 shipped with JEP 424, so my question here is:

Are there any plans to migrate away from JNI and Buffers, eventually?

I suspect the answer is yes, when Foreign Function & Memory API makes it out of preview into a permanent feature. Will such a reform call for LWJGL 4?

Stacktrace or crash log output

[LWJGL] [ThreadLocalUtil] Unsupported JNI version detected, this may result in a crash. Please inform LWJGL developers.
octylFractal commented 1 year ago

See #813 about Project Panama.

octylFractal commented 1 year ago

And the JNI issue is fixed by #799, which is part of the 3.3.2 snapshot builds.