To exit JShell, type
I stayed in the JShell for a few minutes, executing things like
/exit
.I stayed in the JShell for a few minutes, executing things like
exit
, CTRL + c
, end
and q!
, q
, quit
all fail. The correct syntax for exiting or quitting JShell is /exit
.
Terminal
C:\Users\mkyong>jshell
| Welcome to JShell -- Version 11.0.1
| For an introduction type: /help intro
jshell> exit
| Error:
| cannot find symbol
| symbol: variable exit
| exit
| ^--^
jshell> q
| Error:
| cannot find symbol
| symbol: variable q
| q
| ^
jshell> quit
| Error:
| cannot find symbol
| symbol: variable quit
| quit
| ^--^
jshell> end
| Error:
| cannot find symbol
| symbol: variable end
| end
| ^-^
jshell>
Finally, /exit
.
Terminal
jshell> /exit
| Goodbye
reference
Wikipedia – JShellOracle – JShell Introduction
Tags:
Java 9
Jshell
Translated from: https://mkyong.com/java/how-to-exit-jshell-in-java/
Read More:
- Python program exit: OS_ Exit() and sys.exit ()
- Java was started but returned exit code = 13
- How to use scanner to accept char type characters in Java
- How to generate UML Diagrams from Java code in Eclipse
- The @ Autowired annotation in springboot is invalid in ordinary classes. How to solve and use the null pointer exception java.lang.nullpointerexception
- How does a Mac terminal exit the python command line
- Shortcut to exit zoom mode in VirtualBox [off]
- How to generate main () method in java graphical interface
- Java was started but returned exit code = 13 problem solving
- How to get the current time in java time string
- How many pieces of data can list store in Java?
- Git did not exit cleanly (exit code 128)
- In function `_start’ undefined reference to `main’ error: ld returned 1 exit status
- Solution to error [error] LD returned 1 exit status in C language
- Java – how to shuffle an ArrayList
- Why can’t Scala shell enter Q to exit
- Syntax error, insert “Finally” to complete TryStatem in Myeclipse in Java-
- How To Fix Windows Java Error 1723
- How to Fix java.net.ConnectException: Connection refused: connect
- How to set JAVA_HOME on mac