How to develop against 2025.1 but run against 2025.2?

I tried next

val runUltimate252 by intellijPlatformTesting.runIde.registering {
    type = IntelliJPlatformType.IntellijIdeaUltimate
    version = "252.18003.27" // just "2025.2" is not working here
}

and getting error :frowning:

> Task :runUltimate252 FAILED
[0.011s][warning][cds] Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.intellij.util.lang.PathClassLoader"). To use archived non-system classes, this property must not be set
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
Exception in thread "main" java.lang.ClassNotFoundException: kotlinx.coroutines.debug.AgentPremain
	at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:235)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:504)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:572)
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message Outstanding error when calling method in invokeJavaAgentMainMethod at s\src\java.instrument\share\native\libinstrument\JPLISAgent.c line: 627
*** java.lang.instrument ASSERTION FAILED ***: "success" with message invokeJavaAgentMainMethod failed at s\src\java.instrument\share\native\libinstrument\JPLISAgent.c line: 466
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at s\src\java.instrument\share\native\libinstrument\JPLISAgent.c line: 429

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':runUltimate252'.
> Process 'command 'C:\Users\artem\.gradle\caches\8.10.2\transforms\3d7ef05a1e877f08e7ba99243d7acb19\transformed\ideaIU-252.18003.27-win\jbr\bin\java.exe'' finished with non-zero exit value 1

same trick with anything but 2025.2 works

Tool Version
Gradle 8.10.2
IntelliJ Platform Gradle Plugin 2.6.0

I get the same on linux

Tool Version
Gradle 8.14
IJ Platform Gradle Plugin 2.6.0

It seems the jar with the coroutines-agent only contains the manifest and not the class files

jar -tvf build/coroutines-javaagent.jar  
   131 Tue Jun 03 19:00:46 CEST 2025 META-INF/MANIFEST.MF

The manifest file:

Manifest-Version: 1.0
Premain-Class: kotlinx.coroutines.debug.AgentPremain
Can-Retransform-Classes: true
Multi-Release: true

my run task looks similar as:

val runIdeEAP by intellijPlatformTesting.runIde.registering {
    type = IntelliJPlatformType.IntellijIdeaCommunity
    version = "252-EAP-SNAPSHOT"
}

I ended installing the eap with JB ToolBox and then installing the plugin manually.

1 Like

I get the same issue with IU-252.18003.27 and IU-252.19874.12. Disabling or enabling “Build, Execution, Deployment” > “Debugger” → “Attach coroutine agent” doesn’t fix the problem

> Task :runIde FAILED
[0.008s][warning][cds] Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.intellij.util.lang.PathClassLoader"). To use archived non-system classes, this property must not be set
Exception in thread "main" java.lang.ClassNotFoundException: kotlinx.coroutines.debug.AgentPremain
	at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:235)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:504)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:572)
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message Outstanding error when calling method in invokeJavaAgentMainMethod at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 627
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
*** java.lang.instrument ASSERTION FAILED ***: "success" with message invokeJavaAgentMainMethod failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 466
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 429
V  [libjvm.dylib+0x525854]  jni_FatalError+0x7c
V  [libjvm.dylib+0x68d2ec]  JvmtiExport::post_vm_initialized()+0x2b8
V  [libjvm.dylib+0xa2450c]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x6c8
V  [libjvm.dylib+0x5441dc]  JNI_CreateJavaVM+0x74
C  [libjli.dylib+0xa228]  JavaMain+0x100
C  [libjli.dylib+0xd5b0]  ThreadJavaMain+0xc
C  [libsystem_pthread.dylib+0x72e4]  _pthread_start+0x88
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGABRT (0x6) at pc=0x000000018e577720, pid=56892, tid=4355
#
# JRE version: OpenJDK Runtime Environment JBR-21.0.7+6-1020.35-jcef (21.0.7+6) (build 21.0.7+6-b1020.35)
# Java VM: OpenJDK 64-Bit Server VM JBR-21.0.7+6-1020.35-jcef (21.0.7+6-b1020.35, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# C  [libsystem_kernel.dylib+0x9720]  __pthread_kill+0x8
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
JNI global refs:
JNI global refs: 8, weak refs: 0

JNI global refs memory usage: 835, weak refs: 833

OOME stack traces (most recent first):
Classloader memory used:
Loader bootstrap                                                                       : 562K
Loader jdk.internal.loader.ClassLoaders$AppClassLoader                                 : 271K