Search code examples
exceptionkotlinread-eval-print-loop

How to fix Kotlin REPL exception NoClassDefFoundError


I'm attempting to run the Kotlin REPL on my windows 10 machine, from the command line. I am receiving a java.lang.NoClassDefFoundError: org/jline/reader/LineReaderBuilder exception when running the command kotlinc

I have IntelliJ Ultimate 2019.1.3 installed, with the Kotlin plugin. I have the Kotlin standalone compiler also installed and I've added that location to my system path. I've tried to run the command from the standalone directory: "C:/Tools/kotlinc/bin" but no difference.

  • OS Name: Microsoft Windows 10 Enterprise
  • Version 10.0.16299 Build 16299
  • Kotlin version 1.3.40-release-123 (JRE 1.8.0_131-b11)
  • java version "1.8.0_131"

I expect the REPL to start without an exception. What could be causing the exception?

Thank you all!


Solution

  • It looks like that was a bug and it has been fixed with Kotlin plugin & kotlinc version 1.3.41 (released today).