-
Notifications
You must be signed in to change notification settings - Fork 150
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
RandomRegistry not compatible with JRE 17 #866
Comments
Java 17 is sufficient for running Jenetics. But I would recommend an official full Java installation, since it is not defined whats in a JRE. There is no longer an official JRE from Oracle, and I don't know what this builds left out. |
I just tried out the latest JRE 17 (Build 17.0.7+7) from https://adoptium.net/temurin/archive/ and it doesn't work either. In my opinion DEFAULT_RANDOM_FACTORY in RandomRegistry should use PRNG which is also known to JRE 17. |
From the Java documentation
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/package-summary.html |
Yes, Java SE contains the JDK. Therefore, a Java SE installation will work because all LXM Group PRNG are known (because they are part of the JDK). |
Signed-off-by: Franz Wilhelmstötter <franz.wilhelmstoetter@gmail.com>
…e_random_generator #866: Make default random generator configurable.
The default random generator can be changed via system property of the command line.
|
@jenetics We came accross the same problem when adopting Jenetics in OpenEMS. OpenEMS is an open-source Energy Management System. Its Edge part typically runs on IoT hardware like a Raspberry Pi, where a JRE is often preferred. We use Jenetics currently to evaluate when to charge, block or discharge a solar battery in combination with dynamic prices (for more info see Code, Screenshots, Video) Further integrations like electric vehicle charging, heat-pumps, etc. are planned - and will increase the search-space... For our use-case the Therefor we solved this issue by dynamically finding the best available A similar approach is also suggested in the JDK documentation: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGeneratorFactory.html
Would you accept a pull-request that adds this feature in RandomRegistry.java? |
We could do some checks, when initializing the
Looking forward for your PR 👍 You might create a new issue for this enhancement and add a link to this one. |
According to the documentation Jenetics 7.1.3 requires "at least Java 17". However, it's not clear from the documentation if a JRE 17+ is sufficient.
We use the bundled Jetbrains JRE in IntelliJ during execution in our project. If RandomRegistry is initialized, an ExceptionInInitializerError is thrown because the static member variable is initialized as
However, the PRNG L64X256MixRandom as part of JDK 17 and not known in JRE 17, which leads to a ExceptionInInitializerError.
The text was updated successfully, but these errors were encountered: