I am following the following instructions https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jre.html#CFHIEGAA to install JRE 9. I downloaded the .tar.gz file moved it to the /usr/ directory and extracted it. However running java -version gives error "Command java not found"
1 Answer
The java
binary isn't in your PATH
. The quickest way to fix this would be to check what directory the .tar.gz file extracted to - there will be a java
binary inside there. Create a link to that binary in /usr/bin
(which is almost certainly in your PATH
ln -s /usr/java/jre-whatever/bin/java /usr/bin/java
You should then be able to run the command as you described.