I have installed Jdk9 on MAC OSX and I have added the JDK path to bash_profile. When I use jshell command from terminal, I am getting 'Command not found' error. I am able to get the correct version number when I type command java -version
.
How do I access the jshell from terminal? do i need to include jdk 9 bin folder path in bash_profile
?
JShell is a Java read-eval-print loop which was first introduced in the JDK 9.
To start JShell, enter the jshell command on the command line. JDK 9 or higher must be installed on your system. If your path doesn't include the bin directory, for example java-home/jdk-9/bin , then start the tool from within that directory.
Add JDK-9 bin in PATH environment variable.
export PATH=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/bin:$PATH
jshell
| Welcome to JShell -- Version 9.0.1
| For an introduction type: /help intro
jshell>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With