I'm trying out the new JShell program with the java9 jdk. I want to debug an interactive console app I'm making, but it seems System.in
doesn't work. For example:
[root@mycomputer home]# jdk-9/bin/jshell
| Welcome to JShell -- Version 9-ea
| Type /help for help
-> new Scanner(System.in).next()
It just freezes here and locks the keyboard up completely. I have to kill the process in another terminal in order to get my prompt back.
As mlk points out, it looks like this is a known bug. Has anyone found a workaround?
My specs: Redhat x86_64, Gnome-Terminal, Java9 Build 109