I installed latest Kotlin and Java (tried both v 8 and 11) by using sdkman on Ubuntu 18.04.
I’m under assumption that I can have Kotlin REPL by running kotlinc-jvm
on command line. I tried it but I’m getting this error:
exception: java.lang.NoClassDefFoundError: org/jline/reader/LineReaderBuilder
at org.jetbrains.kotlin.scripting.repl.reader.ConsoleReplCommandReader.<init>(ConsoleReplCommandReader.kt:19)
at org.jetbrains.kotlin.scripting.repl.configuration.ConsoleReplConfiguration.<init>(ConsoleReplConfiguration.kt:19)
at org.jetbrains.kotlin.scripting.repl.ReplFromTerminal$Companion.run(ReplFromTerminal.kt:158)
at org.jetbrains.kotlin.scripting.compiler.plugin.JvmCliReplShellExtension.run(JvmCliReplShellExtension.kt:24)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:111)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:56)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:84)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:42)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:82)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:50)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:215)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:207)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:296)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:81)
at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:43)
Caused by: java.lang.ClassNotFoundException: org.jline.reader.LineReaderBuilder
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 21 more
$ kotlinc-jvm -version
info: kotlinc-jvm 1.3.40 (JRE 1.8.0_212-b03)
$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)