Assinador TJPR projudi

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.gz from the Oracle Java SE 8 Archive.

Step-by-Step Installation Instructions

  1. Create a directory for Java:

    bash

    sudo mkdir -p /usr/local/java
    
    
  2. Move and Extract the Archive:
    Assuming you downloaded the file to your Downloads folder, move it and extract it:

    bash

    cd ~/Downloads
    sudo tar -zxvf jdk-8u231-linux-x64.tar.gz -C /usr/local/java
    
    
  3. Set Up Environment Variables:
    Open the /etc/profile file to add the Java paths:

    bash

    sudo nano /etc/profile
    
    

    Add 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 PATH
    
    

    Save and close the file (Ctrl+O, Enter, Ctrl+X).

  4. 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
    
    
  5. Verify the Installation:

    bash

    java -version
    

Boa sorte