use this to choose java alternative if you have already installed.
/usr/sbin/alternatives --config java
문제
Java Setup on Scientific Linux showing two diffent versions.
I am trying to get java setup right on Scientific Linux.
If I do a javac -version I get the following: java_1.7.0_10 which is the version that I really want to be using.
But if I do a java -version I get the following:
OpenJDK Runtime Environment (IcedTea6 1.11.5) (rhel-1.50.1.11.5.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)**
Which is not the version I would like to run with... Can someone please tell me how to fix this issue.. thanks
해결책
use this to choose java alternative if you have already installed.
/usr/sbin/alternatives --config java
다른 팁
You should check your $PATH enviroment-variable.
Type which javac
to see where the javac-binary is located.
For example:
which javac -> /usr/local/bin/javac
then execute:
export PATH=/usr/local/bin/:$PATH
Could you post please the output from:
which java && which javac
update-alternatives --list java