106

When using the JShell, how do I exit it back to the CMD line?

I have already tried ctrl + x and just writing quit, but to no joy.

Maroun
  • 94,125
  • 30
  • 188
  • 241
Bryn
  • 1,091
  • 2
  • 7
  • 8

3 Answers3

178

You can use the JShell command to exit as:

/exit

Side note: Interestingly, with the use of command abbreviations for input shortcuts:-

/ex

(of course /exi) also, resolves into the same command.

enter image description here

Naman
  • 27,789
  • 26
  • 218
  • 353
4

Ctlr + D will quit the JShell and go back to the command-line.

Sumedh
  • 107
  • 1
  • 1
  • 6
3

inorder to exit from jshell you can use the command /exit