tlf30
March 19, 2021, 5:07pm
1
Hello,
I don’t know how many people have tried, but I figured I would report on running jme on jdk 16.
I was able to compile, run tests, and run a jme app without any issues on jdk 16.
This is not surprising as I did not see any deprecations that should cause us problems, but I figured I would check.
Anyways, for anyone wondering, it does work.
Thanks,
Trevor
8 Likes
I haven’t done any explicit testing per se, but I’m also running my jME application on JDK 16 without issues.
1 Like
sgold
March 19, 2021, 11:07pm
3
But note that the latest release of Gradle (v6.8.3) doesn’t support any JDK beyond 15.
https://docs.gradle.org/current/userguide/compatibility.html
1 Like
Yes - I’m using a pre-release Gradle v7 right now, though with the new-ish Java Toolchains feature you can build against a JDK that Gradle itself doesn’t run on:
java {
toolchain {
languageVersion = JavaLanguageVersion.of(16)
}
}
2 Likes
Good to know. Thank you
Making a post like this is really useful for Googlers who just want answers.
2 Likes
Ali_RS
July 16, 2021, 1:57pm
6
Note that ReflectionAllocator
seems to be broken with JDK 16.
SEVERE: Buffer cannot be destroyed: java.nio.DirectFloatBufferU
Even by adding this JVM arg (which used to solve that on jdk 11+)
"--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED"
you can test it with
package jme3test.app;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.util.BufferUtils;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
public class TestReleaseDirectMemory extends SimpleApplication {
public static void main(String[] args){
TestReleaseDirectMemory app = new TestReleaseDirectMemory();
app.start();
}
@Override
public void simpleInitApp() {
Box b = new Box(1, 1, 1);
Geometry geom = new Geometry("Box", b);
6 Likes