You can install the oracle JDK using apt-get, following the next steps:
Add a custom repository:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
Install the latest jdk version:sudo apt-get install oracle-javaX-installer
Note: Replace X with the version number.Update the current default version:
sudo update-alternatives --config java
sudo update-alternatives --config javac
Update your java home path:sudo nano /etc/environment
JAVA_HOME="YOUR_PATH"
source /etc/environment
echo $JAVA_HOME
Note: Use the path displayed while updating alternatives.I wish that I can help someone.
No comments:
Post a Comment