Posts

Showing posts with the label setup jdk

How to setup java development kit on ubuntu

Download the latest jdk file in .tar.gz format from given link below http://www.oracle.com/technet…/…/javase/downloads/index.html extract the .tar.gz file open terminal type:- sudo tar -zxf jdk_file_name.tar.gz -C /path/to/extract Now set the latest jdk your default jdk type:- sudo update-alternatives --install /usr/bin/java java /jdk/home/bin/java 1 sudo update-alternatives --install /usr/bin/javac javac /jdk/home/bin/javac 1 Now check your java version type:- java -version you will find your java installed in additional you can set JAVA_HOME variable in path type :- sudo nano /etc/bash.bashrc add this lines at the end of file JAVA_HOME=/path/to/jdk/ export JAVA_HOME now save your changes and run !!!!!!!!!!!!!