I upgraded my system to the latest Ubuntu. However, it seems that it's shipped with java 11. I removed it because I need Java 8. However, it seems that Java 8 won't install on my system and I was googling and I stumbled by this: https://launchpad.net/~webupd8team/+archive/ubuntu/java How can I install Jre and jdk 8 on my system?
Asked
Active
Viewed 6,455 times
4
-
I just want to run some JavaFX project in netbeans – Nano Apr 19 '19 at 19:48
-
I get this message when I use JDK 11: The JDK you are using does not support JavaFX.. – Nano Apr 19 '19 at 19:50
-
tried that now. Didn't work. Still have the same error – Nano Apr 19 '19 at 19:57
-
@Kulfy he is saying that "PPA has been discontinued as of April 16, 2019 (reference). So it's better to delete it." so it's not beneficial – Nano Apr 19 '19 at 20:12
-
@Kulfy I was able to install Java 8 thanks a lot. However, my problem: the JDK you are using does not support JavaFX hasn't got solved yet – Nano Apr 19 '19 at 20:32
-
I created a post on that: https://stackoverflow.com/questions/55767178/error-the-jdk-you-are-using-does-not-support-javafx – Nano Apr 19 '19 at 20:49
1 Answers
5
You can download deb packages from old repositories, my answer assumes you have amd64.
Download debs
wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk-headless_8u191-b12-2ubuntu0.18.10.1_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u191-b12-2ubuntu0.18.10.1_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u191-b12-2ubuntu0.18.10.1_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u191-b12-2ubuntu0.18.10.1_amd64.deb
Install them
sudo dpkg -i openjdk-8-jre-headless_8u191-b12-2ubuntu0.18.10.1_amd64.deb openjdk-8-jre_8u191-b12-2ubuntu0.18.10.1_amd64.deb openjdk-8-jdk_8u191-b12-2ubuntu0.18.10.1_amd64.deb openjdk-8-jdk-headless_8u191-b12-2ubuntu0.18.10.1_amd64.deb
Install missing dependency packages
sudo apt install -f
Bojan Kseneman
- 166
- 2
-
1I was trying to install Minecraft on 19.04 and couldn't get Java 8 installed. This answer worked perfectly. – Elijah Goforth Apr 19 '19 at 20:58
-
https://askubuntu.com/a/1139285/165511 30 April 2019 so in terminal `sudo apt install openjdk-8-jdk` this worked for me – tgkprog May 14 '19 at 10:25