Both of the above classes are packaged in the jdk.internal.misc package.
One of the ways you can try to access them is to use the option
--add-exports <source-module>/<package>=<target-module>(,<target-module>)*
for your use case:
--add-exports java.base/jdk.internal.misc=your.module
Note : - Waiver of JEP-261: Module System -
The --add-exports and --add-opens options should be used with great care. You can use them to access the internal library API by the module or even the JDK itself, but you do so at your own risk: if this internal API is changed or deleted, then your library or application will not be executed.
nullpointer
source share