Download JDK from ORacle. Run Terminal:
#Next line will add java to symlink
Or, better if you can set environment variable by adding the following lines at the bottom of .bashrc by "gedit ~/.bashrc":
You can now check if the java is installed properly in terminal:
These will return the version of java and javac.
chmod u+x jdk-6u31-linux-i586.bin ./jdk-6u31-linux-i586.bin sudo mv jdk1.6.0_31 /usr/lib/jvm/
#Next line will add java to symlink
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_31/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_31/bin/javac" 1
Or, better if you can set environment variable by adding the following lines at the bottom of .bashrc by "gedit ~/.bashrc":
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_03 export PATH=$PATH:$JAVA_HOME/bin
You can now check if the java is installed properly in terminal:
java -version javac -version
These will return the version of java and javac.
No comments:
Post a Comment