Java - Cannot add export from java.base

1.1k Views Asked by At

I've modified openjdk14's module jdk.jartool and renamed it (So when I deploy a jar for clients to use, the default jdk.jartool in their jdk won't take place instead).

Now, when I try to run the module, I get the following issue:

Exception in thread "main" java.lang.IllegalAccessError: class sun.security.tools.kmsjarsigner.Main (in module jdk.kmsjartool) cannot access class sun.security.util.DisabledAlgorithmConstraints (in module java.base) because module java.base does not export sun.security.util to module jdk.kmsjartool
    at jdk.kmsjartool/sun.security.tools.kmsjarsigner.Main.<clinit>(Main.java:92)

I've added from Intellij the following JVM arguments: JVM Arguments

Now, as you can see, I've added exports and opens to java.base/sun.secruity.util, yet I still get IllegalAccessError when I try to use it.

Can you help me find out what I'm doing wrong?

Thanks!

0

There are 0 best solutions below