How to setup Java-Home and Path in Ubuntu 12.04
Solution 1:
Installation of Oracle Java:
- Donwload the tarball from Oracle website
-
unzip it using this command:
sudo tar -xvpzf fileName -C /installation_folder_name`
- change the files permission and ownership
-
add the following two lines in
/etc/profile
export JAVA_HOME=/home/abu/Java/jdk1.8.0_45/ export PATH=$JAVA_HOME/bin:$PATH
- restart the machine and check by
java -version
andjavac -version