I am trying to install Java JRE 8 on my Linux machine (Ubuntu 14.04 (Trusty Tahr)). I've done two things:
The first was follow Java's help page. I downloaded the tarball and installed it using the tar zxvf jre-8u73-linux-x64.tar.gz
command. However, when I run:
java -version
I get: bash: /usr/bin/java: No such file or directory
There are no configuration files, and the binary files in /bin/
are endless... I am not sure which I am supposed to execute. I tried to execute the java
file, but that did nothing.
So, I tried to just apt-get it. These are the commands I ran:
add-apt-repository ppa:openjdk-r/ppa
apt-get update
apt-get install openjdk-8-jre
However, again, when I run java -version
, it displays the same thing.
So I said screw it, let me just mkdir /usr/bin/java
and try it again. I autoremoved the package, and reinstalled it. Now I just get
bash: /usr/bin/java: Is a directory
when I run java -version
.
How can I fix this?
mkdir /usr/bin/java
you create a directory not an executable, so that's why you getbash: /usr/bin/java: Is a directory
. Try to remove/usr/bin/java
, reinstall the package viappa
andapt
and write the output of the commandls -l /usr/bin/*java*
please.ls: cannot access /usr/bin/*java*: No such file or directory
. Interestingly enough, when I runjava -version
, I get a couple of java packages, but not openjdk-8-jre