I am trying to installing on Centos java from Oracle. Following are my steps.
yum install /usr/local/jdk-7u3-linux-x64.rpm alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000 alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000 alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000 alternatives --config java I pick the latest version here.
The problem now only my java is pointing to the new version wheras the javac is not pointing to it below is how I trace for java and javac.
ls -la /usr/bin/java lrwxrwxrwx. 1 root root 22 May 22 13:09 /usr/bin/java -> /etc/alternatives/java ls -la /etc/alternatives/java lrwxrwxrwx. 1 root root 25 May 22 13:09 /etc/alternatives/java -> /usr/java/latest/bin/java
ls -la /usr/bin/javac lrwxrwxrwx. 1 root root 23 May 22 11:37 /usr/bin/javac -> /etc/alternatives/javac ls -la /etc/alternatives/javac lrwxrwxrwx. 1 root root 48 May 22 11:37 /etc/alternatives/javac -> /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/javac
Any solution to overcome this? I have tried previously on other machines on Centos 6.3 works fines.