I call a Java compiler, jar and other Java tools from my code. However the code stopped working in JDK 16 and up with the following error:
Unable to make public static void sun.tools.jar.Main.main(java.lang.String[]) accessible: module jdk.jartool does not "exports sun.tools.jar" to unnamed module @46d21ee0
How to make my code working again for JDK 16 and up?
Edit: Unfortunately, there is no straight example of the problem, but some points:
Calling a tool: https://github.com/drogatkin/TJWS2/blob/02f4489ceddf325649eb2ac08cb98d51884f15fb/1.x/bee.xml#L513
Implementation: https://github.com/drogatkin/7Bee/blob/1a4443f3315ed39c38190bc128573b4329a49538/src/java/org/bee/processor/Task.java#L161