Problem description: When using the Kotlin compiler (kotlinc) of any version from the command line (not IntelliJ IDEA, but a separate folder with a .bat file), and when specifying multiple libraries (.jar files) using -cp or -classpath, I get the error: "source entry is not a Kotlin file". The problem only occurs when using multiple libraries; if I use a single library, everything works fine.
Environment: windows: cmd, shell, or Runtime.getruntime().exec() in IntelliJ IDEA
Steps to reproduce: I have tried different delimiters (:,;), as well as different cmd/shell/Runtime.getruntime().exec(), tried to use wildcards(*) instead of listing.
Command in shell/cmd:
C:\Users\MSI\Desktop\COMMANDLINE\kotlin-compiler-1.9.0\kotlinc\bin\kotlinc.bat -cp C:/Users/MSI/Desktop/COMMANDLINE/libs/* C:\Users\MSI\Desktop\bbb\kotlin.kt -include-runtime -d C:\Users\MSI\Desktop\bbb\gigga.jar
Code in IntelliJ IDEA:
val command = ProcessBuilder(
"C:\\Users\\MSI\\Desktop\\COMMANDLINE\\kotlin-compiler-1.9.0\\kotlinc\\bin\\kotlinc.bat",
"-cp", "C:/Users/MSI/Desktop/COMMANDLINE/libs/*",
"C:\\Users\\MSI\\Desktop\\bbb\\kotlin.kt",
"-include-runtime",
"-d", "C:\\Users\\MSI\\Desktop\\bbb\\gigga.jar"
)
val start = command.start()
val code = start.waitFor()
I want the code to be compiled with all the libraries
-cp "C:/Users/MSI/Desktop/COMMANDLINE/libs/*"?