Setting -Djava.security.egd=file:/dev/urandom does not take effective in Java

Solution Verified - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content