Install Oracle Java Developement Kit on UDOO’S Ubuntu
If for some reasons the Java Open-JDK runtime environment doesn’t suit your needs, these are the necessary step to install the Oracle JDK.
First you need to download the proper package by clicking here
We’re going to download version 8 update 6 for ARM hard float, since current UDOO’S Ubuntu is the hard float version.
If Java 8 update 6 is no longer featured, you can find the download by using this previous releases link found on the main download page.
Once the download has finished, open the downloaded package by double-clicking on it. Before extracting it, we must set correct privileges into destination folder, which is /usr/lib/jvm
sudo chmod -R 777 /usr/lib/jvm
Now we can extract the files, so point the extraction to /usr/lib/jvm
tar xzvf .tar.gz -C /usr/lib/jvm/
Once done, we inform Ubuntu where Java installation resides
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_06/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_06/bin/javac" 1
And make it the default Java installation
sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0_06/bin/java sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_06/bin/javac
Edit your /etc/profile file using:
sudo nano /etc/profile
if you don’t have nano installed
sudo apt-get install nano
Add the following entries to the bottom of the file:
JAVA_HOME=/usr/lib/jvm/jdk1.8.0_06 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin export JAVA_HOME export PATH
Save your changes using CTRL + X
Now, reload system-wide path with
Let’s test our new Java installation
java version "1.8.0_06" Java(TM) SE Runtime Environment (build 1.8.0_06-b18) Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode)
Done, you’ve succeeded in installing Java on UDOO!