0

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!

  • try using `jdk.kmsjartool` in the JVM arg instead of `ALL-UNNAMED`. `ALL-UNNAMED` is for unnamed modules and your moduke is named. – dan1st Dec 29 '21 at 09:57
  • @dan1st Thanks for your time. I did try doing that, but I still get the same issue. Any other ideas, maybe? – Eatay Mizrachi Dec 29 '21 at 10:20

0 Answers0