I'm trying to setup a multiplatform application project but I can't figure out how to (nicely) get the generated jar to execute it. In the native case there's
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
. Not sure how to add kotlin-runtime to classpath in this setup. 😞
r
r4zzz4k
01/09/2019, 7:30 AM
You should not just run one jar, but form claasspath based on runtime configuration from Gradle -- it would have your classes and your dependencies. I'll try to remember to get back to you as soon as I get to office, if you or someone else doesn't provide Gradle snippet to do in.
d
Dominaezzz
01/09/2019, 8:32 AM
Thank you! 😊
h
h0tk3y
01/09/2019, 11:09 AM
Here's a snippet I use to run one the classes of a JVM target with a Gradle task:
Yeah, I had something along those lines too.
@Dominaezzz by the way, there is an issue for having this out of the box, you can follow it if you wish: https://youtrack.jetbrains.com/issue/KT-27273