How to install Oracle Java Version 8 on Ubuntu?
NOTE: All of the tools developed by Link-Assistant.Com are built using the latest Java technology. They require a recent version of Java Runtime Environment to function correctly.
Therefore, to install and run the software on your Ubuntu, you'll need to make sure that you have Oracle Java set as your system's default Environment. Open JDK is not supported at this time.
1. If needed, uninstall the previous Oracle Java versions through Terminal with the following command:
sudo apt remove [java version file]
for example:
sudo apt remove oracle-java17-installer
*removes Java v17. Make sure to specify the folder, which stores the files related to the Java you are looking to remove.
2. Go to the official Oracle website and download the 'Linux x64' java version, it will be loaded as an archive:
3. Unpack the archive and move the folder to the directory where you store java files (in our example it is /usr/lib/jvm). By default most Java versions (both Oracle and Open JDK) are stored in '/usr/lib/jvm' directory:
sudo mv [folder name] /[path to directory]
As on the screenshot above:
sudo mv jre1.8.0_333 /usr/lib/jvm
4. Once you have the installation folder (in our example - jre1.8.0_333) in the correct directory, set the path for an alternative Java version through Terminal:
sudo update-alternatives --install /usr/bin/java java /[path to a folder with an alternative java]/bin/java 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.8.0_333/bin/java 1
*make sure to specify the path to the installation folder.
5. Run the following command in Terminal to complete the installation of your new Java version:
sudo update-alternatives --config java
*you should see the Update Alternatives window where you should select the newly added java version (in our example - java 1.8.0_333) as default and hit Enter.
To check whether the system has successfully completed the installation, run the following command:
java -version
Should there be any troubles completing the Java installation on your Ubuntu OS, do not hesitate to contact our support team via support@link-assistant.com, we'll do our best to assist!
Comments
0 comments
Please sign in to leave a comment.