java -version are different in user and root terminal
Solution 1:
I would guess that it is caused by incorrect $PATH
setting, so java is first searched in /opt/IBM/ace-11.0.0.12/common/jdk/jre/bin/
instead of standard /usr/bin/java
.
You can check your path echo
echo $PATH
and compare output from root / non-root terminals. Then you would need to check where additional entry is added (common suspects are /etc/profile
, ~/.bash_profile
, ~/.bashrc
, ~/.bash_login
and ~/.profile
)