Do non-Android Kotlin programs need a JRE to run?
# announcements
f
Do non-Android Kotlin programs need a JRE to run?
r
If you're targeting the JVM, yes. If you're targeting JS or Native, no.
👍 1
f
JVM yes
Thank you
r
You could bundle a JRE with your program to avoid requiring the user to have one on their machine.
f
but doesn't this kinda destroy the purpose of the JVM
because I have to make one for each OS
r
Or compile it to native with Graalvm 😎 and ship a binary without jre
r
@Florian Maybe to some degree, but there are plenty of advantages to the Java ecosystem beyond just having the JVM installed everywhere (including safety, available libraries, etc.). Occasionally it makes sense to not expect the user to have a JRE installed (or even perhaps an incompatible JRE), but you still want the advantages of the ecosystem.
👍 1
f
ok I see, thank you