Replace --illegal-access workaround with --add-exports
--illegal-access=permit doesn't work since JDK 17. #KT-47152 Fixed
This commit is contained in:
+1
-1
@@ -377,7 +377,7 @@ object KotlinCompilerClient {
|
|||||||
val javaVersion = CompilerSystemProperties.JAVA_VERSION.value?.toIntOrNull()
|
val javaVersion = CompilerSystemProperties.JAVA_VERSION.value?.toIntOrNull()
|
||||||
val javaIllegalAccessWorkaround =
|
val javaIllegalAccessWorkaround =
|
||||||
if (javaVersion != null && javaVersion >= 16)
|
if (javaVersion != null && javaVersion >= 16)
|
||||||
listOf("--illegal-access=permit")
|
listOf("--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED")
|
||||||
else emptyList()
|
else emptyList()
|
||||||
val args = listOf(
|
val args = listOf(
|
||||||
javaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
|
javaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
|
||||||
|
|||||||
Reference in New Issue
Block a user