Scala REPL no echo on input

scala debian
scala download
update scala version
sbt install scala
scala home
scala binary
yum install scala
scala download 2.11 11

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?

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
$ sudo dpkg -i scala-2.11.8.deb

sbt - Scala REPL no echo on input, 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  After upgrading to Scala 2.11.7 on Windows, the REPL when started using sbt console does not display the user's input when typing anymore. Only after pressing ENTER, one can see the result of evaluating the input (but not the input itsel

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:

(or just download and install via dpkg)

You can verify jline2 is the problem by running scala -Ydebug, and looging for ByteBuffer class not found error.

I've also submitted bugs to hopefully address this issue in the future.

No display in scala console (REPL) on Ubuntu 18.04 · Issue #4173 , I've read the CONTRIBUTING guidelines steps Run 'scala' to get the REPL problem There is no display (key echo) when typing and Ctrl+D  Read keyboard input in Scala with the typed characters visible. This solved the problem of no echo on REPL for me with Scala 2.11.12 on Ubuntu 18.04. It breaks

Scala 2.11.1 has some compatibility issues after upgrading to Ubuntu 18.04. Everything works after updating Scala/sbt to latest version.

sbt console won't allow any input. · Issue #4021 · sbt/sbt · GitHub, any input. It doesn't echo back anything I type except key It responds to my and changes a li just for clarity in sbt "console" is how you access the Scala REPL​. Though the fix was 2 month ago, but still no release yet. 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

Ammonite REPL, Scala. Create scripts that you can run easily from the command line, without the The Ammonite-REPL is an improved Scala REPL, re-implemented from first principles. for input and output, Artifact Loading in-REPL, and all the other nice Features! _ @ %ls build.sbt log ops readme repl terminal echo modules project​  This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 14.12, “How to prompt users for input from Scala shell scripts.” Problem. You want to prompt a user for input from a Scala shell script and read her responses. Solution

How to run shell commands from the Scala REPL, You want to be able to run a shell command from within the Scala REPL, such as listing the files in the current directory. Solution. Run the  The REPL can be embedded and invoked programmatically. It supports the javax.script API, or it can be used as either a code interpreter or an interactive command line. import import import javax.script._

Scala shell scripts and the command line: Prompting the user, and , A great thing about Scala is that not only is it scalable, it was also This includes small shell script tasks like prompting a user interactively from a shell script, and reading their input. all of these methods that are available on the Scala Console class: Using `puts` or `echo` instead of `println` in Scala. The Scala REPL is a tool ( scala) for evaluating expressions in Scala. The scala command will execute a source script by wrapping it in a template and then compiling and executing the resulting program. In interactive mode, the REPL reads expressions at the prompt, wraps them in an executable template, and then compiles and executes the result.

  • Almost exactly the same question was posed in the last week or so (can't find it right now), but at least it seems that you're not alone with that problem. Google search for "scala repl does not show input" gives a few hits, maybe something here, here, or here is useful?
  • It turned out to be a problem with scala 2.11.1. I have two scala versions on my workstation and the default was using the older one. Things worked after I updated everything to 2.12.6.
  • I think it would still be good if you posted it as your own answer, eventually marking it as "community wiki". Want to have something to redirect duplicates to.
  • This worked for me until I used sudo apt upgrade, at which point the problem came back.
  • Did work for me. However, the other answer from Loki seems to be a better long term solution
  • For me: sudo apt install libjline2-java after activating the ppa.