0

I uninstalled Java 8, installed Java 11 configured environment path. Opened command prompt in administrator mode, typed jshell which opened jshell and shows following text:

C:\WINDOWS\system32>jshell
|  Welcome to JShell -- Version 11.0.10
|  For an introduction type: /help intro
jshell>

Now when I type some command/text, it is not visible in command prompt and hitting enter button too doesn't affects anything. However if i press ctrl+c, it start showing previous typed command as shown in below image, but again hitting enter button doesn't do anything:

my command prompt image

How to fix this issue. Please help.

Joshua
  • 1,128
  • 3
  • 17
  • 31
  • Works for me. See this [image](https://imgur.com/a/35MxGfl). I am on Windows 10. My Java version is `OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)` – Abra Apr 07 '21 at 03:47

2 Answers2

1

This is a known bug with JShell for a certain version of Java. Update your Java version and the problem should go away.

Mike Slinn
  • 7,705
  • 5
  • 51
  • 85
  • 11.0.10 is already the latest patch for Java 11 LTS, and the link you gave was for a ctrl+D bug, not the issue described by the OP. – k314159 Apr 07 '21 at 10:18
0

Try a simple command:

jshell> System.out.println("Hello World!");

... and provide here if it prints:

Hello World!
Tiago Luz
  • 129
  • 6