# coroutines

Grigory Panko

06/24/2022, 8:37 PM
Hi everyone. I'm in process of migrating my JVM application from Java 16 to Java 17. My application uses coroutines 1.6.2 and used to work fine on Java 16, but now it throws
java.lang.IllegalAccessError: class kotlin.coroutines.jvm.internal.DebugProbesKt (in module kotlin.stdlib) cannot access class kotlinx.coroutines.debug.internal.DebugProbesImpl (in module kotlinx.coroutines.core.jvm) because module kotlin.stdlib does not read module kotlinx.coroutines.core.jvm
on any coroutine launch. I guess it's because Java 17 removed support for
option. I tried to use
--add-reads kotlin.stdlib=kotlinx.coroutines.core.jvm
option, but it shows
WARNING: Unknown module: kotlin.stdlib specified to --add-reads
on JVM init and still throws error on coroutines access. Any ideas how can I fix it?