Hello. I am having issues with running kotlin compiler in the command line in windows.
I follow the instructions on the kotlinlang.org page here => https://kotlinlang.org/docs/tutorials/command-line.html
I downloaded and unzipped the command line compiler and put the folder into my Program Files x86 directory.
I added to the Path environment variable a dir path to the bin folder where the kotlinc.bat files exist with other various .bat
files and other files with no extension.
Here is the path I used in the environment variable.
Environment Variable Path => C:\Program Files (x86)\kotlin-build-1.3.40-dev-1595\compiler\cli\bin
When I open the command line and type the command => kotlinc or => kotlinc --help, I get the error below.
Error => Could not find or load main class org.jetbrains.kotlin.preloading.Preloader
any help is appreciated. 🙂
f
fred.deschenes
04/10/2019, 3:04 PM
Any reason you're using the CLI version instead of just setting up a Gradle/Maven project from an IDE?
a
Al Warren
04/10/2019, 7:14 PM
If you don't have IntelliJ get a copy of the community version. It'll save you tons of headaches.
☝️ 1
k
KinsonDigital
04/11/2019, 1:28 PM
I do indeed have IntelliJ. I am only using the CLI for curiosity reasons when it comes to Kotlin Scripting.