code: public byte[] generateSeed(int length)
      {
          for (SeedGenerator generator : GENERATORS)
          {
              try
              {
                  byte[] seed = generator.generateSeed(length);
                  try
                  {
                      boolean debug = System.getProperty(DEBUG_PROPERTY, "false").equals("true");
                      if (debug)
                      {
                          String seedString = BinaryUtils.convertBytesToHexString(seed);
                          System.out.println(seed.length + " bytes of seed data acquired from " + generator + ":");
                          System.out.println("  " + seedString);
                      }
                  }
                  catch (SecurityException ex)
                  {
                      // Ignore, means we can't read the property so just default to false.
                  }
  
                  return seed;
              }
              catch (SeedException ex)
              {
                  // Ignore and try the next generator...
              }
          }
          // This shouldn't happen as at least one the generators should be
          // able to generate a seed.
          throw new IllegalStateException("All available seed generation strategies failed.");
      }
docs: Generates a seed by trying each of the available strategies in
  turn until one succeeds.  Tries the most suitable strategy first
  and eventually degrades to the least suitable (but guaranteed to
  work) strategy.
  @param length The length (in bytes) of the seed.
  @return A random seed of the requested length.