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:
- Why can’t Scala shell enter Q to exit
- Problems encountered in VS2010 compilation
- Problems encountered after Maven installation or upgrade: could not find or load main class org.codehaus.plexus .class…..
- The computer can’t turn on ERROR: NO BOOT DISK HAS BEEN DETECTED OR THE DISK HAS FAILED
- Two problems in OpenGL Programming
- Installation and use of graphviz under mac
- Linux GCC compilation error: “collect2: LD returned 1 exit status”
- gerrit error: missing Change-Id in commit message footer
- Java 8 Stream – Read a file line by line
- How does a Mac terminal exit the python command line
- Save file and exit command of vim
- How to call stored procedure in Hibernate
- What is cs1525 error
- Python program exit: OS_ Exit() and sys.exit ()
- Error: could not find java.dll Error: could not find Java se runtime environment solution
- On the problem that VTK + QT process can’t end after closing the program
- Solve the error error fetching remote repo origin problem in Git on Jenkins
- Urllib2.httperror: http error 403: forbidden solution
- Exit spark shell
- Problems and solutions in using Linux