Mavity
12/23/2025, 1:05 AMMain-Class attribute for the MANIFEST.MF of my JVM jar in Kotlin Multiplatform.
I've tried using the (admittedly experimental) API under the jvm() function, but it doesn't seem to be working.
Short snippet here: (obviously not the literal thing)
kotlin {
jvm {
binaries {
executable {
mainClass = "path.to.main.class.ClassKt"
}
}
// I also have a `mainRun` configuration in this block, but that's related to the jvmRun configuration moreso (at least to my understanding)
}
// if it's relevant, I have a `jvmToolchain(25)` call here, but I doubt it matters
...
}
However, if I observe the actual jar's manifest, there's no mention of the main class, and it Java can't run it without feeding in the main class to the args.
Does anyone know how I can properly configure the JVM jar?