I am on Linux Centos 6.
I've installed Java JRE and JDK on my machine.
[root@mhsapp002 conf]# java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
[root@mhsapp002 conf]# javac -version
javac 1.7.0_55
Also, I've manually set JAVA_HOME in .bash_profile
file.
PATH=$PATH:$HOME/bin
export PATH
export JAVA_HOME=/opt/java/jre1.7.0_60
export PATH=/opt/java/jre1.7.0_60/bin:$PATH
[root@mhsapp002 conf]# echo $JAVA_HOME
/opt/java/jre1.7.0_60
Also, I've tried set both options in using alternatives
.
[root@mhsapp002 conf]# alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
1 /opt/java/jre1.7.0_60/bin/java
*+ 2 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
[root@mhsapp002 conf]# readlink -f $(which java)
/opt/java/jre1.7.0_60/bin/java
Now I am trying to install datastax opscenter-agent which requires java on the machine. But it fails with following error:
Some agent installations failed:
- 127.0.0.1: Failure installing agent on 127.0.0.1.
Standard output:
Unable to find a java executable!
Please install java or set JAVA_HOME.
Exit code: 4
Do you have any ideas or suggestions for what reason it is fails? Thanks for any help!