kotlin バージョンを確認する

kotlin バージョンを確認する



  • OS windows11 home
  • java 17.0.2
  • kotlin 1.6.10-release-923



> kotlin -version

Kotlin version 1.6.10-release-923 (JRE 17.0.2+8)


> kotlin -h

kotlin: run Kotlin programs, scripts or REPL.

Usage: kotlin <options> <command> [<arguments>]
where possible options include:
  -howtorun <value>          How to run the supplied command with arguments,
                             valid values: guess (default), classfile, jar, script (or .<script filename extension>)
  -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-stdlib                 Don't include Kotlin standard library into classpath
  -no-reflect                Don't include Kotlin reflection implementation into classpath
  -compiler-path             Kotlin compiler classpath for compiling script or expression or running REPL
                             If not specified, try to find the compiler in the environment
  -X<flag>[=value]           Pass -X argument to the compiler
  -version                   Display Kotlin version
  -help (-h)                 Print a synopsis of options
and command is interpreted according to the -howtorun option argument
or, in case of guess, according to the following rules:
  foo.Bar                    Runs the 'main' function from the class with the given qualified name
                             (compiler arguments are ignored)
  app.jar                    Runs the given JAR file as 'java -jar' would do
                             (compiler arguments are ignored and no Kotlin stdlib is added to the classpath)
  script.kts                 Compiles and runs the given script, passing <arguments> to it
  -expression (-e) '2+2'     Evaluates the expression and prints the result, passing <arguments> to it
  <no command>               Runs Kotlin REPL
arguments are passed to the main function when running class or jar file, and for standard script definitions
as the 'args' parameter when running script or expression