Installing Oracle JAVA JDK 8 on Ubuntu [Offline]
download jdk from here first
Steps To Install JDK on Ubuntu or deepin os:
Step 1: Copy the Downloaded Java into home directory .
Step 2: Change the permission by clicking on properties . [change to Read, Write, Execute (777)]
Step 3: Now Open The Terminal and Paste this command
Copy All Code
tar -xvzf jdk-8u51-linux-x64.tar.gz
Press Enter.
Step 4: Create jvm folder in /usr/lib by the following command .
Copy All Code
sudo mkdir /usr/lib/jvm
Step 5: Move extracted jdk 8 folder to this location
Copy All Code
sudo mv jdk1.8.0 /usr/lib/jvm/jdk1.8.0
Step 6: Install new java source in the system:
Copy All Code
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8.0/bin/javaws 1
Step 7: Choose default java:
Copy All Code
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
Step 8: Now you have successfully installed java in your system.
Comments
Post a Comment