I guess this can only be achieved with `-include-r...
# getting-started
p
I guess this can only be achieved with
-include-runtime
if some native Kotlin library calls from
Console
are involved.
🧵 2
v
Please do not split topics across several threads. This makes following the conversation in the threads view very hard as the context of the other messages is missing. If you have additional information either edit the original message or post to its thread. Regarding the question, the Kotlin runtime is like any other dependency you declare, no matter whether Java, Kotlin, or any other language. By using
-cp target\kotlin\classes
you only add your own classes to the classpath, but you also have to add all dependencies you use to the classpath for them to be found, including the Kotlin runtime. The
-include-runtime
flag of
kotlinc
would indeed build a bad-practice fat-jar with the Kotlin runtime included, so if you don't have other dependencies it would work. If you would use Gradle, I'd recommend to use the
application
plugin to build a proper distribution instead with all your dependencies, your classes, and generated start scripts for Windows and *nix to run the application. With Maven (assuming you use it due to "target/"), you can achieve something similar with a combination of the
appassembler
plugin and the
assembly
plugin and a bunch of configuration what is a three-liner in Gradle.
p
Thx!
I try to stay disciplined.