Iaroslav Postovalov
01/04/2020, 6:25 AMMatteo Mirk
02/12/2020, 10:47 AM▶ kotlin -h
kotlin: run Kotlin programs, scripts or REPL.
Usage: kotlin <options> <command> <arguments>
where command may be one of:
foo.Bar Runs the 'main' function from the class with the given qualified name
app.jar Runs the given JAR file as 'java -jar' would do
(-classpath argument is ignored and no Kotlin runtime is added to the classpath)
and possible options include:
-classpath (-cp) <path> Paths where to find user class files
-Dname=value Set a system JVM property
-J<option> Pass an option directly to JVM
-no-reflect Don't include Kotlin reflection implementation into classpath
-version Display Kotlin version
-help (-h) Print a synopsis of options
the option you want is -cp
just like javac
, but you don’t want to this manually. Instead use a build tool like maven or gradle.