-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java 8 compatibilities #2
Comments
So without reading the stackoverflow link, I can tell you we had the exact same problem, but just the opposite when switching to Java 11. The ABI/API has changed, and as such both versions aren't really interchangeable, as far as I understand. I'd need to look into the link (and you can do something by splitting into modules/classes that you load dynamically that implement an interface), but the ultimate solution would be to use the regular lwjgl2 release for java <= 8 and to use my fork starting with java 11 anyway. Edit: note that this may also apply to jme itself. |
Note that If I build the lwjgl.jar with java 8 (using |
Please see: I updated github workflow to build it with java 8 and disabled compiling natives and instead uploaded the precompiled linux natives. The Also applied lwjgl2-primarymonitor-patch-xrandr made by @riccardobl that partially fix jMonkeyEngine/jmonkeyengine#947 (we still have the AWT issue sometimes returning incorrect display mode that needs to be settled as well. see jMonkeyEngine/jmonkeyengine#1890 (comment)). In the tests I did it works fine with java 8 and 11+. (it resolves jMonkeyEngine/jmonkeyengine#1247 and jMonkeyEngine/jmonkeyengine#1215) Now we need to decide how to ship it to maven central in |
Hi @MeFisto94
I am getting this exception when using java 8
See this for more details:
https://stackoverflow.com/questions/61267495/exception-in-thread-main-java-lang-nosuchmethoderror-java-nio-bytebuffer-flip
I tried approach 1 described above by adding release="8" when building with java 11 but I did not succeed. The error still happens.
Another approach is to find and cast all ByteBuffers to Buffer before calling flip(), limit(),... methods. Seems we should update lots of code this way.
Can we use java 8 to build the lwjgl.jar and only use java 11 for building natives?
Or do you know a better solution?
The text was updated successfully, but these errors were encountered: