Supposedly missing parameter when compiling from terminal


If I compile and run this little example within IntelliJ everything is fine:

import java.nio.file.Files.readAllLines
import java.nio.file.Paths

fun main(args: Array<String>) {
    val path = Paths.get("/tmp/export.csv")
    val lines = readAllLines(path)

However, if I try to compile it from the terminal, I get:

> kotlinc csv.kt
csv.kt:6:34: error: no value passed for parameter p1
    val lines = readAllLines(path)

What is wrong here?


Different Kotlin versions or different Java versions (thus different JDK)?


Can’t delete my message…