4

I have a rather strange problem on two of my notebooks one running Manjaro Linux (Arch for children) and the other Ubuntu 20.10. When I use Jshell the read-eval-print loop tool for Java 11, I can't paste into Jshell, not with the mouse and not with ctrl+p I made a little video demonstrating the problem.

It only happens in Jshell, normal bash isn't affected. (echo command at the beginning of the first video works fine)

https://www.mediafire.com/file/xjy9i8np16zfuit/Peek+2021-06-15+18-03.mp4/file (under 1 MB big)

I made another recording that shows that in ether xfce4 terminal or st terminal after pasting a string of characters into jshell it freezes, until typing 17 characters into the seemingly frozen jshell, when the pasted text appears plus the typed in characters after the freeze. (if i use letters instead of numbers like in the video the output looks like this:

jshell> System.out.println("This is a Test...")abcdefghijklmnopqrs
in both st and xfce4 terminal 

https://www.mediafire.com/file/m2asx0y5tatnj89/Peek+2021-06-15+18-36.mp4/file (1.3 MB)

Used Java Version on both machines is:

openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9)
OpenJDK 64-Bit Server VM (build 11.0.11+9, mixed mode)

If this should be a question for a Java board, could you point one out to me?

0

2 Answers 2

5

This might be due to the issue: https://bugs.openjdk.java.net/browse/JDK-8242919

Trying to paste to jshell causes a deadlock. 

This was fixed in Java 15 a while ago, but only recently backported to 11u (should be fixed in 11.0.12)

1
  • Thanks, I also saw this on Java 11.0.11. Fixed in newer 11.0.x versions. Commented Apr 26, 2022 at 8:58
1

Use

OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9

until there is a new build with the fix noted by @Jorn

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .