# GLFW with LWJGL on Anbernic RG351P with RK3326 on Batocera

**URL:** <https://discourse.glfw.org/t/glfw-with-lwjgl-on-anbernic-rg351p-with-rk3326-on-batocera/2363>\
**Category:** support\
**Created:** [April 20, 2023, 9:35pm UTC](https://discourse.glfw.org/t/glfw-with-lwjgl-on-anbernic-rg351p-with-rk3326-on-batocera/2363 "2023-04-20T21:35:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gamernerd](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@gamernerd](https://discourse.glfw.org/u/gamernerd)\
**Post date:** [April 20, 2023, 9:35pm UTC](https://discourse.glfw.org/t/glfw-with-lwjgl-on-anbernic-rg351p-with-rk3326-on-batocera/2363/1 "2023-04-20T21:35:21Z")

</div>

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](https://www.lwjgl.org/guide) .

This results in a

```auto
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.

---

<div class="post-metadata">

**Author:** ![elmindreda](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/elmindreda/32/26_2.png) [@elmindreda](https://discourse.glfw.org/u/elmindreda)\
**Post date:** [May 31, 2023, 8:55pm UTC](https://discourse.glfw.org/t/glfw-with-lwjgl-on-anbernic-rg351p-with-rk3326-on-batocera/2363/2 "2023-05-31T20:55:23Z")

</div>

> [@gamernerd](#):
>
> `Failed to detect any supported platform`

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.
