Closed SonicGDX closed 6 months ago
openjdk-17 doesn't work for running LWJGL2. You can stick with openjdk-8, or you may have better luck with other Java distributions. LWJGL2 is not maintained (last release 9 years ago) so this will not be fixed.
Yeah I just tested an old built jar file and it failed with the same error. JDK incompatibility makes sense. It's definitely not a liftoff issue, although I think it is worth mentioning in the documentation somewhere that LWJGL2 is broken with Java 17+, since that is the version recommended for the rest.
Might be easiest to ask the user if they know what they're doing, if selecting that option, as issues with the LWJGL2 backend extend far beyond this. In a way, this specific issue is a niche one - the number of people who will want to use the obsolete and abandoned backend is minimal, and the subset of those users who are on Linux with the JRE from their distro-provided repositories is even smaller.
Yeah, this isn't really a Liftoff issue, it's an issue with specific vendors of OpenJDK (on Linux or maybe MacOS only) not interoperating with the dilapidated LWJGL2 code. I'm also pretty sure that LWJGL2 is broken on distro-provided JDKs for versions earlier than 17, though I don't know how early. I think Adoptium should work. I don't have a Linux machine to test on right now.
Just tested with Temurin 17 and it does work. Apologies, I assumed it was an issue with Java 17 in general. An interesting bug for sure, I'll probably stop using the distro ones now.
BTW: I would recommend WSL if you want an easy way to test Linux stuff on Windows
OS: Linux gdx-liftoff version: 1.12.1.6
Steps I used to reproduce:
It says the run was successful but in reality the application didn't show up and I had this log: