Dylan
02/04/2020, 9:05 PMDylan
02/04/2020, 9:06 PMhttps://kotlinlang.slack.com/files/UP93BG1NF/FTJL144F2/image.png▾
Dylan
02/04/2020, 9:06 PMhttps://kotlinlang.slack.com/files/UP93BG1NF/FT5T0QGH0/image.png▾
Dylan
02/04/2020, 9:06 PMDylan
02/04/2020, 9:07 PMhttps://kotlinlang.slack.com/files/UP93BG1NF/FTLGTL5PH/image.png▾
Czar
02/04/2020, 9:32 PM@JvmStatic
, just put fun main()
on the top level of the file:
fun main() {
println("Hello World!")
}
2. if you are using gradle you'll want to configure the jar in gradle instead of IntelliJ
3. I'm not sure what OS you are using, but usually jars are run from command line with something like java -jar helloworld.jar
Mike
02/05/2020, 1:27 AMDylan
02/05/2020, 7:40 AMCzar
02/05/2020, 7:47 AMDylan
02/05/2020, 8:58 AMCzar
02/05/2020, 9:09 AMimplementation
or api
, compile is deprecated for a long time now.Dylan
02/05/2020, 9:10 AM