- Launch Terminal and type the following command
Edit /etc/environment set JAVA_HOME path for external applications like Eclipse and Idea
For more information, Please clicked on the link below
http://stackoverflow.com/questions/25289482/installing-jdk8-on-ubuntu-unable-to-locate-package-update-doesnt-fix
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
When there are multiple Java installations on your System, the Java version to use as default can be chosen. To do this, execute the following command.
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
Edit - Manual Java Installation
Download oracle jdk
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Extract zip into desired folder
e.g /usr/local/ after extract /usr/local/jdk1.8.0_65
Setup
sudo update-alternatives --install /usr/bin/java java /usr/local/jdk1.8.0_65/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/local/jdk1.8.0_65/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/local/jdk1.8.0_65/bin/javaws 1
sudo update-alternatives --set java /usr/local/jdk1.8.0_65/bin/java
sudo update-alternatives --set javac /usr/local/jdk1.8.0_65/bin/javac
sudo update-alternatives --set javaws /usr/local/jdk1.8.0_65/bin/javaws
Edit /etc/environment set JAVA_HOME path for external applications like Eclipse and Idea
For more information, Please clicked on the link below
http://stackoverflow.com/questions/25289482/installing-jdk8-on-ubuntu-unable-to-locate-package-update-doesnt-fix
Comments
Post a Comment