JShell <Shift + tab i> not working properly in jdk 9

When I tried JShell in Fedora, I tried to use the fragment conversion shortcut as indicated here , but I think it doesn’t work. It shows

Unexpected character after Shift-Tab. Use "i" to automatically import or "v" to create a variable. For more information see:

/Hotkeys

I tried the methods indicated in these posts, but still the same result

any ideas or am i doing something wrong?

$ javac -version

javac 9

java -version

openjdk version "9"

OpenJDK workbench (build 9 + 181)

64-bit OpenJDK virtual machine (build 9 + 181, mixed mode)

Here is what I am trying to do:

jshell $ new JFrame

new JFrame, shift + tab i ( shift , i). , - :

0: Do nothing
1: import: javax.swing.JFrame
Choice:

Shift-Tab. "i" "v" . .:

+4
1

:

Shift + Tab..Release both..Press 'i' 'v'

--- ---

  • , ,

    Enter '1' 
    Press Shift+Tab then Press 'v'
    Provide a variable name
    

    enter image description here

    Provide a variable name and you are done with.
    

    enter image description here

  • java, . JFrame

    Enter 'new JFrame'
    

    enter image description here

    Provide your choice
    
+5

Source: https://habr.com/ru/post/1687311/


All Articles