Sim, ja tentei todos os tutoriais possiveis kkkk
Instalar a versão compatível no ubuntu
To install Java 8 Update 231 (8u231) on Ubuntu, you must manually download the Oracle JDK/JRE 8u231 .tar.gz archive from the Oracle Java Archive, as it is no longer available in default repositories.
Prerequisites
-
Ubuntu Terminal access.
-
An Oracle account to download the file (required for older versions).
-
Download
jdk-8u231-linux-x64.tar.gzfrom the Oracle Java SE 8 Archive.
Step-by-Step Installation Instructions
-
Create a directory for Java:
bash
sudo mkdir -p /usr/local/java -
Move and Extract the Archive:
Assuming you downloaded the file to yourDownloadsfolder, move it and extract it:bash
cd ~/Downloads sudo tar -zxvf jdk-8u231-linux-x64.tar.gz -C /usr/local/java -
Set Up Environment Variables:
Open the/etc/profilefile to add the Java paths:bash
sudo nano /etc/profileAdd the following lines at the end of the file:
bash
JAVA_HOME=/usr/local/java/jdk1.8.0_231 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin export JAVA_HOME export PATHSave and close the file (Ctrl+O, Enter, Ctrl+X).
-
Configure Update Alternatives:
Tell the system to use this specific Java version:bash
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_231/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_231/bin/javac" 1 -
Verify the Installation:
bash
java -version
Boa sorte