Recently, I run into troubles because the lack of entropy and blocking rand IO caused hangs. On Linux, I can do the following:
JAVA_OPTS=-Djava.security.egd=/dev/urandom ./myStartScript.sh
What is the equivalent on Windows? We are running the app on both Linux and Windows servers, linux servers using OpenJDK JRE and Windows servers using Oracle JRE.
I found a lot of suggestions about CryptGenRandom
, but how can I pass that to the app on the JVM level?