Oracle JDK 8 Quick Start on Solus
Hello Solus User! The Tutorial shows you Step-by-Step How to Install and Getting-Started with the Oracle-Sun Official Java JDK 8 on Linux Solus Desktop.
After Installing you will need to Use the update-alternatives Tool to Update your System Java to JDK 1.8.
The JDK is a superset of the JRE, and contains everything in the JRE, plus tools such as compilers and debuggers for development.
The Content give Focus Only to the Essentials Instructions and Commands to make it Easier to Follow.
-
Download Oracle Java SE JDK 8 for Linux:
JDK 8 32/64-bit Linux tar.gz
-
Find and Double-Click on the tar.gz Archive.
Extract it Into the /tmp Folder.
-
Open a Terminal Window
(Press “Enter” to Execute Commands)
In case first see: Terminal QuickStart Guide.
-
Relocate Oracle JDK 8
su
If Got “User is Not in Sudoers file” then Look:
Solution
if [ ! -d "/usr/lib/jvm" ]; then mkdir /usr/lib/jvm; fi
The above Command is used to Create a jvm Directory if not already there.
And Set the SuperUser as owner:
sudo chown -R root:root /tmp/jdk1.8*
Reiterate the Execution Permission over the Java binaries
chmod -R +x /tmp/jdk1.8*/bin
Finally, Shift the Java contents with
mv /tmp/jdk1.8* /usr/lib/jvm/
-
Installing Oracle Java JDK 8
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8*/bin/java 1065
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8*/bin/javac 1065
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8*/bin/jar 1065
update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8*/bin/javaws 1065
Checking or Setting the System Java Version in Use with
update-alternatives --config java
And for the Java Compiler instead:
sudo update-alternatives --config javac
To Switch of Java Version Just Enter the Reference Number on First, Column. :)
Last achieve the SuperUser session with:
exit
-
Getting-Started and Running with JDK 8:
Quick Start Tutorial for JDK 8 Development