{"record":{"id":"f5b886dfee22a01a","repo":"libgdx/libgdx","slug":"unknown-lwjgl-platform","errorCode":null,"errorMessage":"Unknown LWJGL platform: ","messagePattern":"Unknown LWJGL platform: ","errorType":"exception","errorClass":"GdxRuntimeException","httpStatus":null,"severity":"critical","filePath":"backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglNativesLoader.java","lineNumber":83,"sourceCode":"\t\t\t\tbreak;\n\t\t\tcase MacOsX:\n\t\t\t\tlwjglLib = \"liblwjgl.dylib\";\n\t\t\t\topenalLib = \"openal.dylib\";\n\t\t\t\tbreak;\n\t\t\tcase Linux:\n\t\t\t\tswitch (bitness) {\n\t\t\t\tcase _32:\n\t\t\t\t\tlwjglLib = \"liblwjgl.so\";\n\t\t\t\t\topenalLib = \"libopenal.so\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase _64:\n\t\t\t\t\tlwjglLib = \"liblwjgl64.so\";\n\t\t\t\t\topenalLib = \"libopenal64.so\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (lwjglLib == null) throw new GdxRuntimeException(\"Unknown LWJGL platform: \" + os + \", \" + bitness);\n\t\t\tnativesDir = loader.extractFile(lwjglLib, null).getParentFile();\n\t\t\tif (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo(openalLib, nativesDir);\n\t\t} catch (Throwable ex) {\n\t\t\tthrow new GdxRuntimeException(\"Unable to extract LWJGL natives.\", ex);\n\t\t}\n\t\tSystem.setProperty(\"org.lwjgl.librarypath\", nativesDir.getAbsolutePath());\n\t\tload = false;\n\t}\n}\n","sourceCodeStart":65,"sourceCodeEnd":93,"githubUrl":"https://github.com/libgdx/libgdx/blob/97f40861878058087be0685ca167ddfde132134b/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglNativesLoader.java#L65-L93","documentation":"Thrown by LwjglNativesLoader.load() when the OS+bitness combination detected by SharedLibraryLoader maps to no known LWJGL native library pair (e.g. lwjglLib stays null). The switch covers Windows/Linux (32/64-bit) and macOS; any other platform or unknown bitness yields this error before any extraction is attempted.","triggerScenarios":"Running the desktop backend on an unsupported platform (e.g. ARM Linux before LWJGL supported it, Solaris, FreeBSD) or when os.arch is unexpected so bitness resolution fails, leaving lwjglLib null.","commonSituations":"Deploying to Raspberry Pi / ARM boards (libGDX's bundled LWJGL 2 has no ARM natives); exotic JVMs reporting unusual os.arch values; running on BSD with a Linux JVM reporting wrong os.name.","solutions":["Run on a supported x86/x86_64 Windows/Linux/macOS desktop for the LWJGL backend","For ARM boards, use the LWJGL3 backend (gdx-backend-lwjgl3) with ARM64 natives, or the headless backend if no rendering is needed","Pre-set -Dorg.lwjgl.librarypath to an existing native extraction dir so this loader is bypassed (set LwjglNativesLoader.load = false accordingly)"],"exampleFix":"// before: gdx-backend-lwjgl (LWJGL 2) on ARM Linux -> \"Unknown LWJGL platform\"\nnew LwjglApplication(new MyGame(), config);\n\n// after: use the LWJGL3 backend which ships ARM natives\nnew Lwjgl3Application(new MyGame(), new Lwjgl3ApplicationConfiguration());","handlingStrategy":"fallback","validationCode":"String os = System.getProperty(\"os.name\").toLowerCase();\nString arch = System.getProperty(\"os.arch\");\nboolean supported = (os.contains(\"win\") || os.contains(\"linux\") || os.contains(\"mac\"))\n    && (arch.equals(\"x86\") || arch.equals(\"i386\") || arch.equals(\"amd64\") || arch.equals(\"x86_64\"));\nif (!supported) { /* route to lwjgl3 or headless backend */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check os.name/os.arch before launching the LWJGL2 backend","Ship the LWJGL3 backend for ARM/portable targets","Document supported platforms up front"],"tags":["lwjgl","natives","platform","arm","startup"],"backgroundTag":null,"analyzedSha":"97f40861878058087be0685ca167ddfde132134b","analyzedAt":"2026-08-14T10:52:53.492Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}