JPMS Access Checks, Verification and the Security Manager

Volker Simonis volker.simonis at
Tue May 23 12:45:22 UTC 2017

On Tue, May 23, 2017 at 10:51 AM, David Holmes <david.holmes at> wrote:
> On 23/05/2017 6:20 PM, Alan Bateman wrote:
>> Volker - one suggestion for your experiments is to change your JDK 8
>> security properties file ( to add "com.sun.crypto.provider."
>> to the value of the "package.access" property. That should mean you will get
>> the same AccessControlException with JDK 8 as you do with JDK 9. It may help
>> to reason about the JDK 8 behavior, including what is triggered by
>> verification, before looking at 9.
>> On the "Error: A JNI error has occurred, please check your installation
>> and try again" message. It's not core to your questions of course but I
>> agree it is confusing. Ramanand Patil had a number of attempts on
>> core-libs-dev to improve this and it may be that more is needed there.
> Yes I was sure we had agreed to remove that and I don't see it in Oracle JDK
> so perhaps it is only in OpenJDK launcher?

Hi David,

not sure what you mean? Does the Oracle JDK come with another launcher
compared to the OpenJDK?

I've just tried with the latest EA build 170 (which I assume is an
Oracle JDK) and I see exactly the same error:

java -showversion Tricky ""
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+170)
Java HotSpot(TM) Server VM (build 9-ea+170, mixed mode)
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
access denied ("java.lang.RuntimePermission"
    at java.base/
    at java.base/
    at java.base/java.lang.SecurityManager.checkPermission(
    at java.base/java.lang.SecurityManager.checkPackageAccess(
    at java.base/java.lang.ClassLoader$
    at java.base/java.lang.ClassLoader$
    at java.base/ Method)
    at java.base/java.lang.ClassLoader.checkPackageAccess(
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredMethods(
    at java.base/java.lang.Class.getMethodsRecursive(
    at java.base/java.lang.Class.getMethod0(
    at java.base/java.lang.Class.getMethod(
    at java.base/sun.launcher.LauncherHelper.validateMainClass(
    at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(

So what do you mean when saying that you don't see it in the Oracle JDK?


> David
>> -Alan

More information about the jigsaw-dev mailing list