Q&A for How to Install Oracle Java JDK on Ubuntu Linux

Return to Full Article

Search
Add New Question
  • Question
    My Java version gives me a "cannot execute binary file: Exec format error." What is wrong?
    Community Answer
    You either have a corrupted copy of Java, or - more likely - you installed a version for a different unix variant and/or CPU architecture.
  • Question
    What do I do if the Oracle Java9 installer has no installable candidates?
    Community Answer
    Instead, use: sudo apt install default-jre default-jdk . It seems java9 is no longer supported and not available for download the old-fashioned way.
  • Question
    When I do step 8 it doesn't work, it comes up with: "Unable to locate package oracle-java9-installer". How to make it work?
    Stephen
    Community Answer
    Installing Oracle Java JDK on Ubuntu Linux is a straightforward process. Here are the steps you can follow: First, update the package index on your Ubuntu system by running the following command in your terminal: "sudo apt-get update" (without the quotes). Next, add the Oracle Java PPA (Personal Package Archive) to your system by running the following command: "sudo add-apt-repository ppa:webupd8team/java". After that, update the package index again by running the following command: "sudo apt-get update". Now, you can install Oracle Java JDK by running the following command: "sudo apt-get install oracle-java8-installer".
  • Question
    I get an "Unable to locate package oracle-java9-set-default" error. What should I do?
    Sophiatiger
    Community Answer
    To fix the "Unable to locate package oracle-java9-set-default" error during Oracle Java 9 installation, you can try these solutions: Install a different Java version from the available repository, like Java 8 or Java 11. Verify the repository configuration and package availability to ensure it's up to date. If Java 9 is necessary, download and manually install it from the Oracle website, following their instructions. Consider using the latest stable Java version for enhanced security, performance, and compatibility.
Ask a Question

      Return to Full Article