Java Security get installed providers in Java Runtime

Description

Java Security get installed providers in Java Runtime

import java.security.Provider;
import java.security.Security;
import java.util.Iterator;

public class Main {

  public static void main(String[] args) {
    Provider[] providers = Security.getProviders();
    for (int i = 0; i != providers.length; i++) {
      Iterator<Object> it = providers[i].keySet().iterator();
      while (it.hasNext()) {
        System.out.println(it.next());
      }//from  w ww .  j  a v  a 2  s  . co m
    }
  }
}



PreviousNext

Related