Setting -Djava.security.egd=file:/dev/urandom does not take effective in Java
Issue
My java application using java.security.SecureRandom
hangs like https://access.redhat.com/solutions/34626. To resolve the issue, I tried adding the system property -Djava.security.egd=file:/dev/urandom
to use /dev/urandom
instead of /dev/random
. But it looks the setting does not take effective in Java 6 and 7.
Environment
- Java application using
java.security.SecureRandom
- OpenJDK
- 6
- 7
- Oracle JDBC Driver
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.