[ https://issues.apache.org/jira/browse/RANGER-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123637#comment-17123637 ]
Palash Das commented on RANGER-2317: ------------------------------------ This will do the trick, {code:java} provider = (Provider) Class.forName("sun.security.pkcs11.SunPKCS11") .getConstructor(String.class) .newInstance(pkcs11CfgFilePath); {code} [~zsombor] , [~pradeep] Test it and confirm me, I'll do the PR. Patch: [^0001-RANGER-2317-Use-reflection-to-invoke-constructor-to-.patch] > Enable compilation on JDK11 > --------------------------- > > Key: RANGER-2317 > URL: https://issues.apache.org/jira/browse/RANGER-2317 > Project: Ranger > Issue Type: Improvement > Components: admin, plugins > Reporter: Zsombor Gegesy > Assignee: Zsombor Gegesy > Priority: Major > Fix For: 2.0.0 > > Attachments: > 0001-RANGER-2317-Use-reflection-to-invoke-constructor-to-.patch, > RANGER-2317-2.patch, RANGER-2317-3.patch > > > Currently, Ranger can be compiled only with JDK 8, however JDK 11 is the > current LTS release for Java, it is essential to support it. As a first step, > we need to ensure that Ranger can be compiled on JDK 11. -- This message was sent by Atlassian Jira (v8.3.4#803005)