While trying JShell in Fedora I tried to used snippet transformation shortcut as specified here , but I think It is not working It is showing
Unexpected character after Shift-Tab. Use "i" for auto-import or "v" for variable creation. For more information see:
/help shortcuts
I tried the ways that specified in those messages but still same result
any Ideas or I am doing something wrong?
$javac -version
javac 9
java -version
openjdk version "9"
OpenJDK Runtime Environment (build 9+181)
OpenJDK 64-Bit Server VM (build 9+181, mixed mode)
Here is what I am trying to do :
jshell$ new JFrame
I typed new JFrame
and then pressed shift+tab i(holding shift pressed and releasing tab and then pressing i).
as per the docs it should show me something like:
0: Do nothing
1: import: javax.swing.JFrame
Choice:
but it is showing
Unexpected character after Shift-Tab. Use "i" for auto-import or "v" for variable creation. For more information see:
instead
The way the shortcuts work is as follows :
Press Shift+Tab..Release both..Press 'i' or 'v'
--- Use Cases ---
Type a constant for e.g.
Enter '1'
Press Shift+Tab then Press 'v'
Provide a variable name
Provide a variable name and you are done with.
Use a java internal class e.g. JFrame
Enter 'new JFrame'
Provide your choice
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With