Creating a JShell session and setting context

JShell comes with the JDK installation. You can find it in the bin directory as $JAVA_HOME/bin/jshell. Execute it to start the JShell session. Before you get familiar with JShell, we recommend starting the session with the option -v, which stands for verbose. This way, the shell will add more details to each of your actions, explaining what has been accomplished with each of them. After launching jshell in a terminal window, you will see the following output:

This means that a JShell session is created and can be used for Java code running. Enter the recommended command /help intro and read the ...

Get Java 9 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.