LWJGL or multi release jars in general #9370
Unanswered
priyanahata
asked this question in
Q&A
Replies: 1 comment
-
|
Looking like a bug in JarClassLoader #9371 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Has anyone gone down the track of getting LWJGL to work inside an nbm? I am trying with the latest LWJGL 3.4. and it cant load the FFM class, some AI claims the issue is that the NB Module Class Loader doesn't implement MR and funny enough
I also noticed that when you click on classeess that are under META-INF/versions it doesnt get the sources even if the sources are there?
This is the AI's theory:
The root of the problem is that LWJGL 3.4.1 is a Multi-Release (MR) JAR. In JDK 22+, it uses the org.lwjgl.system.ffm.FFM class (located in the META-INF/versions/22/ directory of the JAR) to leverage the Foreign Function & Memory (FFM) API.
When running as a NetBeans module, the ModuleClassLoader (and the underlying JarClassLoader used for ext libraries) doesn't always automatically respect Multi-Release JARs unless the environment is perfectly aligned. If the classloader fails to see the versions/22 folder, it won't find the FFM class, even though it's physically in the same JAR as JNI.
Beta Was this translation helpful? Give feedback.
All reactions