Reputation: 693
There is a very strange problem with my scala REPL these days that it doesn't echo any input in the terminal.
Tried to remove ~/.sbt but didn't work. Using Ubuntu 18.04 and sbt 1.15.
Any one has similar issues?
Upvotes: 16
Views: 2877
Reputation: 6261
This seems to be an issue with JLine2 being built with JDK9+, but being used on JDK8. If you're on bionic, try this PPA for jline2: https://launchpad.net/~lokkju/+archive/ubuntu/java-compat/
(or just download and install https://launchpad.net/~lokkju/+archive/ubuntu/java-compat/+build/16458066/+files/libjline2-java_2.14.6-1ubuntu1~bionicppa1_all.deb via dpkg)
You can verify jline2 is the problem by running scala -Ydebug
, and looking for ByteBuffer class not found error.
I've also submitted bugs to hopefully address this issue in the future.
Upvotes: 13
Reputation: 253
Had the same issue after upgrading to Ubuntu 18.04. It seems certain Scala versions including 2.11.12 aren't compatible. I was able to get the REPL working properly on version 2.11.8.
To get that version use the following commands:
$ sudo apt-get remove scala-library scala
$ sudo wget www.scala-lang.org/files/archive/scala-2.11.8.deb
$ sudo dpkg -i scala-2.11.8.deb
Upvotes: 18
Reputation: 693
Scala 2.11.1 has some compatibility issues after upgrading to Ubuntu 18.04. Everything works after updating Scala/sbt to latest version.
Upvotes: 5