Skip to main content

Install Oracle Java in Ubuntu via terminal using PPA

- Launch Terminal and type the following command

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

Popular posts from this blog

PHP Session Clean

I was getting the following error when trying to browse the icingaweb2 website in the browser Fatal error: Uncaught ErrorException: Uncaught ErrorException: session_name(): Cannot change session name when session is active in /usr/share/php/Icinga/Web/Session/PhpSession.php:97 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'session_name():...', '/usr/share/php/...', 97, Array) #1 /usr/share/php/Icinga/Web/Session/PhpSession.php(97): session_name('Icingaweb2') #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(152): Icinga\Web\Session\PhpSession->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(540): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(490): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionCont...

Vazhai – Vizhuppuram Visit Experience sharing 3/4/2018 and 4/4/2018

About Vazhai  : Vazhai is an NGO established in 2004 working on mentoring underprivileged kids from Dharmapuri(Bangalore wing of Vazhai) and Vizhupuram(Chennai wing of Vazhai) districts where due to social and political reasons literacy rate is very low. It was formed by Presidency college graduates under the  guidance of experts like  writer Gnani ( https://en.wikipedia.org/wiki/Gnani_Sankaran ). Vazhai does get some financial aid from The Agaram foundation. Vazhai’s main motive is to raise the children to be  a socially responsible person and to groom them so that he/she gets to lead a dignified life in the society . My initital notion about Vazhai was that it is like a typical educational NGO that would focus on academically training the students and to financially support them. But these do NOT feature as a priority in Vazhai’s agenda. Infact they provide very minimal financial aid to the students. Vazhai works like this : ·     ...

Create UIAutomator Project Using Eclipse

Step 1 : Open Eclipse IDE Step 2 : Go to ' File ' -> ' New ' -> ' Java project ' Step 3 : Add Project name and click ' Next ' Step 4 : Click ' Finish ' Step 5 : Expand your project and right click on src folder -> ' New ' -> ' Class ' Step 6 : Enter ' Name ' for class . Also mention ' Package ' and then click ' Finish ' Step 7 : Right click on your project -> open ' Properties ' Step 8 : Go to ' Java Build Path '  Step 9 : Open ' Library Section ' Step 10 : Click on ' Add External Jar ' and navigate to ' android-SDK/platforms ' and choose uiautomator.jar and android.jar file Step 11 : Click on ' Add Library ' -> Select ' JUnit ' . Select JUnit 3. If you want to select JUnit 4. Then you need Java 5. Step 12 : Click ' Next ' -> then ' Finish ' . Then ...