I am using Ubuntu 18.04 + Scala 2.11.12 (OpenJDK 64-Bit Server VM, Java 1.8.0_162).
Once I open the scala shell, I am not able to see anything that I type. It gets typed though.
Below is how it is happening when I type println("Hello, world!")
at console:
$ scala
Welcome to Scala 2.11.12 (OpenJDK 64-Bit Server VM, Java 1.8.0_162).
Type in expressions for evaluation. Or try :help.
scala> Hello, world!
scala>
Any ideas on how we can get through?
This seems to be an issue with JLine2 being built with JDK9+, but being used on JSK8.
JLine is a Java library for handling console input.
just download and install via dpkg:
https://launchpad.net/~lokkju/+archive/ubuntu/java-compat/+build/16458066/+files/libjline2-java_2.14.6-1ubuntu1~bionicppa1_all.deb
Install SBT:
Then Type sbt on the command prompt:
Then Type console
Good to go.
Test: type: printf("Hello Scala")
Cheers!!!
The following thing is working for me.
Open a scala console via sbt.
This is working for me for now.
I am pretty sure its some environment issue. Anyone else facing something similar?
~Abhay
scala 2.11.12 as described above throws some error before the REPL is started, which is taken care in scala 2.12.x Instead remove Scala and Install the latest scala package with dpkg
To fix the problem in the current scala repl session run:
To fix the problem completely removed scala and install it with dpkg (not with apt):
This worked for me!
Ubuntu steps: 1. Go to /usr/share/sbt/bin 2. Open file "sbt" 3. Add "export TERM=xterm-color" right below "#!/bin/sh"
OS X steps: 1. Go to /usr/local/bin/ 2. Open file "sbt" 3. Add "export TERM=xterm-color" right below "#!/bin/sh"