V3.5.0 beta testing

When I update my projects to 3.5.0-beta4, they fail to locate the native LWJGL(3) libraries during startup.
I tried to run them from the IDE (IntelliJ) on both, Windows 10 and Linux Kubuntu,
AdoptOpenJDK 11 and GraalVM 17.

Dec 28, 2021 4:37:32 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.5.0-beta4
 * Branch: HEAD
 * Git Hash: b10d6d4
 * Build Date: 2021-12-17
[LWJGL] Version: 3.3.0 build 21
[LWJGL] 	 OS: Linux v5.11.0-41-generic
[LWJGL] 	JRE: Linux amd64 17.0.1
[LWJGL] 	JVM: OpenJDK 64-Bit Server VM v17.0.1+12-jvmci-21.3-b05 by GraalVM Community
[LWJGL] Loading JNI library: lwjgl
[LWJGL] 	Module: org.lwjgl
[LWJGL] 	linux/x64/org/lwjgl/liblwjgl.so not found in java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
[LWJGL] 	liblwjgl.so not found in java.library.path
[LWJGL] Failed to load a library. Possible solutions:
	a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
	b) Add the JAR that contains the shared library to the classpath.
Dec 28, 2021 4:37:32 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so
	at org.lwjgl.system.Library.loadSystem(Library.java:164)
	at org.lwjgl.system.Library.loadSystem(Library.java:63)
	at org.lwjgl.system.Library.<clinit>(Library.java:51)
	at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:100)
	at org.lwjgl.system.Pointer$Default.<clinit>(Pointer.java:67)
	at org.lwjgl.system.Callback.<clinit>(Callback.java:40)
	at com.jme3.system.lwjgl.LwjglWindow.createContext(LwjglWindow.java:191)
	at com.jme3.system.lwjgl.LwjglWindow.initInThread(LwjglWindow.java:524)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:659)
	at java.base/java.lang.Thread.run(Thread.java:833)


Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "jME3 Main"

I’m using Gradle and the build scripts are all similar to this one:

After the update, I couldn’t find any lwjgl-xxxx-3.3.0-natives-xxxx.jar files inside ~/.gradle.
These do exist for previous LWJGL versions (3.2.3).
The 3.3.0 files are downloaded when I add the dependencies manually, e.g.:

runtimeOnly "org.lwjgl:lwjgl:3.3.0:natives-linux"
runtimeOnly "org.lwjgl:lwjgl-glfw:3.3.0:natives-linux"
runtimeOnly "org.lwjgl:lwjgl-opengl:3.3.0:natives-linux"
runtimeOnly "org.lwjgl:lwjgl-openal:3.3.0:natives-linux"
runtimeOnly "org.lwjgl:lwjgl-jemalloc:3.3.0:natives-linux"

I see the actual *.so files are extracted to some directory in /tmp.
This works for Linux and Windows and the program runs without issues so far.

Updating to previous versions was a breeze and only included changing the jme-version string defined in the Gradle script. But since the error seems obvious and you don’t seem to encounter the same, I assume the issue lies in my Gradle script or maybe the Gradle version (6.1).
Any hints?

1 Like