Usually you install the openjdk like this:
sudo apt-get install openjdk-8-jdk
Maybe this is the problem. You can look this up at http://openjdk.java.net/install/index.html. If you do this you might have fixed this problem. But cant imagine why your command give this result.
Answer from Booming on askubuntu.comUsually you install the openjdk like this:
sudo apt-get install openjdk-8-jdk
Maybe this is the problem. You can look this up at http://openjdk.java.net/install/index.html. If you do this you might have fixed this problem. But cant imagine why your command give this result.
I installed oracle-jdk8. If you need,
sudo add-apt-repository ppa:webupd8team/java && sudo apt update
sudo apt install oracle-java8-installer
How do I install Java 8 JRE
How to install Java 8 on Alpine Linux? - Unix & Linux Stack Exchange
Linux Java 8 Installation
But when i type in sudo apt-get install openjdk-8-jre it doesn't work
More on reddit.comneed help installing java 8 on ubuntu server
Videos
I'm on ChromeOS, using the dev environment. Linux penguin can't install java 8 jre. I tried and this happened:
sudo apt-get install openjdk-8-jre
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package openjdk-8-jre
pls help D:
openjdk is in the community repo.
It seems that you didn't enable community repo.
Go ahead and first enable community repo by uncommenting the community repo in /etc/apk/repositories, then run apk update then execute apk add openjdk11.
Try another version of openJdk8:
RUN apk add openjdk8=8.242.08-r0
The other responses for some weird reason did not work for me. So, to install java 1.8 (from Oracle), I alternatively ran this:
1: Add Oracle’s PPA (Personal Package Archive):
sudo add-apt-repository ppa:webupd8team/java
2: Then update your package repository
sudo apt-get update
3: Install Oracle JDK 8:
sudo apt-get install oracle-java8-installer
That got it working for me. Now, when I run java -version, I get:
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode
For more details, see this post on Medium.com.
I don't know why you're not able to install openjdk from the ppa ppa:openjdk-r/ppa, maybe it has some problems. But if you want to install the Oracle Java, after you have extracted the folder with tar zxvf jre-8u73-linux-x64.tar.gz, you have to make a symbolic link to the executable, try with sudo ln -sv /path-to-extracted-folder/bin/java /usr/local/bin/java.