Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.security.NoSuchProviderException;

import java.security.Provider;

import java.security.Security;

public class Main {
    static Provider getProvider(String provider) throws NoSuchProviderException {
        Provider prov = Security.getProvider(provider);

        if (prov == null) {
            throw new NoSuchProviderException("Provider " + provider + " not found");
        }

        return prov;
    }
}