How can I run the Kotlin REPL kotlinc-jvm or kotlinc
I am completely new to Kotlin and I am trying to get the Kotlin REPL running.
Following this , and given that I am using OS X and I tried this:
$ /usr/local/bin/kotlinc-jvm
which is equivalent to:
$ kotlinc-jvm
Then in the following link , I found that a more convenient way to run it:
$ kotlinc
Are there any differences between these two commands, and which one should I choose?
If you look inside the files kotlinc-jvm
, they actually run kotlinc
, which are in the same folder they are in, and pass any arguments with it:
kotlinc-jvm
for Unix:
#!/usr/bin/env bash
# (License here)
DIR="${BASH_SOURCE[0]%/*}"
: ${DIR:="."}
"${DIR}"/kotlinc "$@"
kotlinc-jvm.bat
for Windows:
@echo off
rem (License here)
call %~dps0kotlinc.bat %*
I'm not sure why kotlinc-jvm
there is in this form, it is basically just a very simple redirect. I would just use kotlinc
.