O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

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

How to do it...

  1. By now, you should have %JAVA_HOME%/bin (on Windows) or $JAVA_HOME/bin (on Linux) added to your PATH variable. If not, then please visit the recipe, Installing JDK 9 on Windows and setting up the PATH variable and Installing JDK 9 on Linux (Ubuntu, x64) and configuring the PATH variable in Chapter 1, Installation and a Sneak Peek into Java 9.
  2. In your command prompt, type jshell and press enter.

 

  1. You will see a message and then a jshell> prompt:
  1. Forward slash (/), followed by the JShell-supported commands, help you in interacting with JShell. Just like we try /help intro to get the following:
  1. Let's print a Hello World ...

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