Kotlinc command line error

3.5k Views Asked by At

I follow this (https://kotlinlang.org/docs/tutorials/command-line.html) instruction. I set the environment variable (windows 7) to bin directory run "kotlinc" at the command line i get the following error (I even navigate to the bin directory from the command prompt)

Error: Could not find or load main class org.jetbrains.kotlin.preloading.Preloader

2

There are 2 best solutions below

0
On

its because spaces in path to kotlinc. Need to convert path from D:/Program Files to D:/.

0
On

The manifest file for hello.jar does not point to main() anymore. I've been asking about this for awhile -- it may have been broken since Kotlin 1.1.