Skip to content

Conversation

bitspittle
Copy link

Recently, I updated a very old KMP project of mine over to latest Kotlin versions (2.2.10 at the time of writing this message) and was informed that the application plugin was no longer compatible, and that I should migrate over to the new JVM binary DSL via https://kotl.in/jvm-binaries-dsl

Confusingly, after doing that, I kept getting an error:

Execution failed for task ':myproject:jvmRun'.
> No main class specified and classpath is not an executable jar.

It turns out jvmRun (which is what I've used for years) is now obsolete, and I thought it would be nicer if the docs made sure to call that out (especially as these docs are linked to directly from the warning issued by the Kotlin Multiplatform Gradle plugin). Especially, this isn't intuitive, as otherwise, all other tasks associated with KMP targets are prefixed by their platform (e.g. nativeBuild, jsBrowserDevelopmentRun, etc.)

Recently, I updated a very old KMP project of mine over to latest Kotlin versions (2.2.10 at the time of writing this message) and was informed that the application plugin was no longer compatible, and that I should migrate over to the new JVM binary DSL via https://kotl.in/jvm-binaries-dsl

Confusingly, after doing that, I kept getting an error:
```
Execution failed for task ':myproject:jvmRun'.
> No main class specified and classpath is not an executable jar.
```
It turns out `jvmRun` (which is what I've used for years) is now obsolete, and I thought it would be nicer if the docs made sure to call that out (especially as these docs are linked to directly from the warning issued by the Kotlin Multiplatform Gradle plugin). Especially, this isn't intuitive, as otherwise, all other tasks associated with KMP targets are prefixed by their platform (e.g. nativeBuild, jsBrowserDevelopmentRun, etc.)
@bitspittle bitspittle requested a review from a team as a code owner August 22, 2025 22:29
@bitspittle
Copy link
Author

I am not a technical writer, so this is just an initial proposal, but you are of course welcome to modify it or even reject it as you see fit. This is also my first PR against the Kotlin website so apologies if I didn't conform to some style guide rules.

The part that would have REALLY helped save me time would have been seeing the new runJvm task called out. I realize now it was hinted at inside the code sample, but that was easy to miss.

When I reached out to the Slack about this issue (https://kotlinlang.slack.com/archives/C19FD9681/p1755846829808169), someone pointed out KT-75240, which I thought was also useful, so I included it in my note, but you could also choose to delete it if you think it's better without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants