In this recipe, we will look at a few basic operations to help us get familiar with the JShell tool.
Getting familiar with REPL
Getting ready
Make sure you have the latest JDK version installed, which has JShell. JShell is available from JDK 9 onward.
How to do it...
- You should have %JAVA_HOME%/bin (on Windows) or $JAVA_HOME/bin (on Linux) added to your PATH variable. If not, please visit the Installing JDK 18.9 on Windows and setting up the PATH variable and Installing JDK 18.9 on Linux (Ubuntu, x64) and configuring the PATH variable recipes in Chapter 1, Installation...