5

I am currently using java 1.8 on my Mac Sierra.

java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

Now I want to run "jshell" for executing simple java commands right from the terminal. But I ended up with the following error message -

Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/jshell" (-1)

What is the workaround do I need to do for avoiding this error message ?

Naman
  • 27,789
  • 26
  • 218
  • 353
Panchu
  • 1,219
  • 1
  • 9
  • 13

1 Answers1

0

As pointed out by @Elliott, you need to download and install Java-9 for working with .

Once you have set the environment variable to make use of the /jdk../.../bin directory. You can execute the command jshell on your command line to get going.

enter image description here

Naman
  • 27,789
  • 26
  • 218
  • 353