O'Reilly logo

Java 9: Building Robust Modular Applications by Jason Lee, Peter Verhas, Dr. Edward Lavieri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting Started with JShell

JShell is a command-line tool that is located in the /bin folder. The syntax for this tool is jshell <options> <load files>. As you can see here, there are several options that can be used with this tool:

You have already seen the -h option, that we executed with jshell -h. This provided the listing of JShell options.

To log into your JShell, you simply use the jshell command. You will see that the prompt in the command window changes accordingly:

Exiting the shell is as easy as entering /exit. Once inside the JShell, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required