Skip to content

Instantly share code, notes, and snippets.

@AnOpenSauceDev
Last active August 28, 2024 12:37
Show Gist options
  • Save AnOpenSauceDev/36719f1ed2770fa0094d6be618b137e3 to your computer and use it in GitHub Desktop.
Save AnOpenSauceDev/36719f1ed2770fa0094d6be618b137e3 to your computer and use it in GitHub Desktop.
List of JVM support for Faster Random's generator.

Known Working JVM's

These JVM's work perfectly with Faster Random on all versions that JEP 356 applies to.

The version denoted only confirms if a JDK version is known to work on the latest non-headless version of that JDK.

JDK Java 17 Java 21
GraalVM
OpenJDK
Microsoft JDK
Adoptium
Azul Zulu

Know a working/broken JDK? Comment what it is!

Headless JDK's tend to not bundle the random generators that Faster Random requires. Some variants of OpenJDK do not have this as well. If the LXM generators are not available, Faster Random will display a pop up, or silently crash.

@Frontear
Copy link

Hi there, wanted to give a heads up that both Adoptium releases do NOT work at the time of writing this comment.

I've tested both the latest 17 release (17.0.11+9) and 21 (21.0.3+9) using the latest version of Faster Random (4.1.0). I'd encourage removing them from the list, at least until Adoptium introduces the JEP into their releases.

I've opened an issue with Adoptium about this as well, if you wish to follow along. Once an explanation is given and the JEP introduced, Adoptium can be added back to this list.

@AnOpenSauceDev
Copy link
Author

For all of these JVM's I have actually downloaded them and physically created a world for each one. Are you sure you're not using a headless JDK? If you do, minecraft will still open, but stuff like RandomGenerator and JavaFX will crash the game.

I will note I'm using an x86_64 Linux build, so I'm not sure if that isn't supported on Windows.

@Frontear
Copy link

Frontear commented Jun 1, 2024

I am indeed using Windows, x86_64 as well. I'll give it a shot on Linux, it might be that the ones built for Linux have different tunings from Adoptium.

Edit: Definitely not using a headless JVM. Afaik Graal doesn't even provide binaries for headless, though if they do I havent actively tried to install a headless version

@pog5
Copy link

pog5 commented Aug 10, 2024

Hello, I'm running Windows 11 24H2 x64 with GraalVM CE

java version "21.0.4" 2024-07-16 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.4+8.1 (build 21.0.4+8-LTS-jvmci-23.1-b41)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.4+8.1 (build 21.0.4+8-LTS-jvmci-23.1-b41, mixed mode, sharing)

Faster RNG (L64X128MixRandom) does not seem to be supported.

[06:19:16 INFO]: [bootstrap] Running Java 21 (Java HotSpot(TM) 64-Bit Server VM 21.0.4+8-LTS-jvmci-23.1-b41; Oracle Corporation Oracle GraalVM 21.0.4+8.1) on Windows 11 10.0 (amd64)
(....)
[06:19:23 INFO]: [STDERR]: java.lang.ExceptionInInitializerError
[06:19:23 INFO]: [STDERR]:      at net.minecraft.util.RandomSource.create(RandomSource.java:34)
[06:19:23 INFO]: [STDERR]:      at net.minecraft.util.RandomSource.create(RandomSource.java:16)
[06:19:23 INFO]: [STDERR]:      at net.minecraft.world.level.levelgen.WorldOptions.randomSeed(WorldOptions.java:136)
[06:19:23 INFO]: [STDERR]:      at net.minecraft.server.dedicated.DedicatedServerProperties.<init>(DedicatedServerProperties.java:166)
[06:19:23 INFO]: [STDERR]:      at net.minecraft.server.dedicated.DedicatedServerProperties.fromFile(DedicatedServerProperties.java:194)
[06:19:23 INFO]: [STDERR]:      at net.minecraft.server.dedicated.DedicatedServerSettings.<init>(DedicatedServerSettings.java:19)
[06:19:23 INFO]: [STDERR]:      at net.minecraft.server.Main.main(Main.java:134)
[06:19:23 INFO]: [STDERR]:      at io.papermc.paper.PaperBootstrap.boot(PaperBootstrap.java:31)
[06:19:23 INFO]: [STDERR]:      at org.bukkit.craftbukkit.Main.main(Main.java:295)
[06:19:23 INFO]: [STDERR]:      at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42)
[06:19:23 INFO]: [STDERR]:      at java.base/java.lang.Thread.run(Thread.java:1583)
[06:19:23 INFO]: [STDERR]: Caused by: java.lang.IllegalArgumentException: No implementation of the random number generator algorithm "L64X128MixRandom" is available
[06:19:23 INFO]: [STDERR]:      at java.base/java.util.random.RandomGeneratorFactory.findProvider(RandomGeneratorFactory.java:229)
[06:19:23 INFO]: [STDERR]:      at java.base/java.util.random.RandomGeneratorFactory.factoryOf(RandomGeneratorFactory.java:275)
[06:19:23 INFO]: [STDERR]:      at java.base/java.util.random.RandomGeneratorFactory.of(RandomGeneratorFactory.java:360)
[06:19:23 INFO]: [STDERR]:      at org.dreeam.leaf.util.math.random.TheFasterRandom.<clinit>(TheFasterRandom.java:17)
[06:19:23 INFO]: [STDERR]:      ... 11 more

@pog5
Copy link

pog5 commented Aug 10, 2024

Tried with Azul Zulu, same result.

openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Zulu21.36+17-CA (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Zulu21.36+17-CA (build 21.0.4+7-LTS, mixed mode, sharing)
[06:29:59 INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.4+7-LTS; Azul Systems, Inc. Zulu21.36+17-CA) on Windows 11 10.0 (amd64)
(....)
[06:30:08 INFO]: [STDERR]: java.lang.ExceptionInInitializerError
[06:30:08 INFO]: [STDERR]:      at net.minecraft.util.RandomSource.create(RandomSource.java:34)
[06:30:08 INFO]: [STDERR]:      at net.minecraft.util.RandomSource.create(RandomSource.java:16)
[06:30:08 INFO]: [STDERR]:      at net.minecraft.world.level.levelgen.WorldOptions.randomSeed(WorldOptions.java:136)
[06:30:08 INFO]: [STDERR]:      at net.minecraft.server.dedicated.DedicatedServerProperties.<init>(DedicatedServerProperties.java:166)
[06:30:08 INFO]: [STDERR]:      at net.minecraft.server.dedicated.DedicatedServerProperties.fromFile(DedicatedServerProperties.java:194)
[06:30:08 INFO]: [STDERR]:      at net.minecraft.server.dedicated.DedicatedServerSettings.<init>(DedicatedServerSettings.java:19)
[06:30:08 INFO]: [STDERR]:      at net.minecraft.server.Main.main(Main.java:134)
[06:30:08 INFO]: [STDERR]:      at io.papermc.paper.PaperBootstrap.boot(PaperBootstrap.java:31)
[06:30:08 INFO]: [STDERR]:      at org.bukkit.craftbukkit.Main.main(Main.java:295)
[06:30:08 INFO]: [STDERR]:      at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42)
[06:30:08 INFO]: [STDERR]:      at java.base/java.lang.Thread.run(Thread.java:1583)
[06:30:08 INFO]: [STDERR]: Caused by: java.lang.IllegalArgumentException: No implementation of the random number generator algorithm "L64X128MixRandom" is available
[06:30:08 INFO]: [STDERR]:      at java.base/java.util.random.RandomGeneratorFactory.findProvider(RandomGeneratorFactory.java:229)
[06:30:08 INFO]: [STDERR]:      at java.base/java.util.random.RandomGeneratorFactory.factoryOf(RandomGeneratorFactory.java:275)
[06:30:08 INFO]: [STDERR]:      at java.base/java.util.random.RandomGeneratorFactory.of(RandomGeneratorFactory.java:360)
[06:30:08 INFO]: [STDERR]:      at org.dreeam.leaf.util.math.random.TheFasterRandom.<clinit>(TheFasterRandom.java:17)
[06:30:08 INFO]: [STDERR]:      ... 11 more

@AnOpenSauceDev
Copy link
Author

Your JVM should support it, but this seems to be an issue with how loading works with the fork of PaperMC that you're using. Unless the issue also shows up with Faster Random on the latest fabric version (it won't crash, so you'll have to look for the warning in logs), this issue doesn't apply here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment