How to access Java 9 Jshell on mac

Viewed 6085

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?

3 Answers

Yes. All you need to do is configure the $JAVA_HOME/bin in your bash_profile which can be done as :

enter image description here and then confirm the java -version on your prompt.

enter image description here

PS: All other variables in bash_profile except JAVA_HOME and PATH in the profile can be ignored.

Related