GitHub user priyanahata created a discussion: LWJGL or multi release jars in 
general

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?

<img width="1798" height="898" alt="image" 
src="https://github.com/user-attachments/assets/0c5eedb7-c8bc-442c-876c-4ea1c88a69e5";
 />


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._


GitHub link: https://github.com/apache/netbeans/discussions/9370

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to