GLFW with LWJGL on Anbernic RG351P with RK3326 on Batocera

Hello everyone,

I have an Anbernic RG351P with a RK3326 CPU running Batocera I want to start writing games for. Preferably with Java. After some tinkering, I got Java running with the aarch64 version of the (Oracle) JDK 17. What is not working though, is graphics with LWJGL 3.3.2 . I took the example from here LWJGL - Lightweight Java Game Library .

This results in a

2023-04-20 22:17:54,956 ERROR (emulatorlauncher:530):runCommand [LWJGL] GLFW_PLATFORM_UNAVAILABLE error
	Description : Failed to detect any supported platform
	Stacktrace  :
		org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:1079)
		org.example.HelloWorld.init(HelloWorld.java:42)
		org.example.HelloWorld.run(HelloWorld.java:24)
		org.example.HelloWorld.main(HelloWorld.java:114)
Exception in thread "main" java.lang.IllegalStateException: Unable to initialize GLFW
	at org.example.HelloWorld.init(HelloWorld.java:43)
	at org.example.HelloWorld.run(HelloWorld.java:24)
	at org.example.HelloWorld.main(HelloWorld.java:114)

Does this mean, that GLFW does not support the platform at all or could the error also be, that it is not able to detect it properly? Is there some additional debugging I could activate which would help with analyzing?

On a Raspberry PI 4 with Batocera the code is running just fine.

It looks like GLFW couldn’t find any of the window systems (X11 and/or Wayland) that it was compiled to support. It may be that neither of them was running. It could also be that your program was started from a shell outside that environment.