Java 9 Java Shell Jshell

So what is Java Shell? It’s a new utility that was introduced in Java 9. Java Shell or JShell was helps developers run short programs very quickly without needing to create classes or methods. You simply declare variables, write statements and execute them using the jshell utility.

The Java Shell tool (JShell) is an interactive tool for learning the Java programming language and prototyping Java code. JShell is a Read Evaluate Print Loop or REPL, which evaluates statements, declarations, and expressions as they are entered and immediately shows the results.

After downloading an installing Java JDK 9, navigate to the bin folder and you will find shell.

If your familiar with unix or linux, using jshell will be very similar. Starti shell by typing jshell on the command line. This will get you into the shell. From there, you can start entering variables, declare statements along with many other commands. In order to exit jshell, just type /exit on the command line.

Java References:

  1. Java Introduction to JShell

Add a Comment

Your email address will not be published. Required fields are marked *