Handling JDK 26's `Unsafe` Removal: Plugin Requires `--add-exports`

With JDK 26 removing Unsafe memory access methods, my plugin now requires access to the jdk.internal.misc package. At runtime, this means IJ must be launched with the following VM option:

--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED

Since my plugin relies on reflective access to otherwise restricted APIs, this is the simplest way to ensure compatibility.

I assume other plugins may face similar issues. Are there plans to address this? Ideally, to avoid requiring users to manually modify command-line options, it would be helpful if plugins could declare VM option requirements in plugin.xml or build.gradle.kts. Is something like this feasible?

We fully control the JDK we run on and the only supported runtime version is 21 at the moment.

Once we migrate to JDK 25 we will address all requirements on our side.

Unfortunately plugins will not be able to affect run options directly, please find a plan B for Unsafe, it will inevitably die at some stage

@yuriy.artamonov I am referring to my plan B—I am not using sun.misc.Unsafe, however my plan requires access to jdk.internal.misc.