:bash java: command not found
Hi everyone, I've just installed java (jre-6u21-linux-i586.bin) on Red Hat 4.4 AS and issued this command to check the java version: java -version
and got :bash :java: command not found |
So this tells you that the java executable is not in your current path.
Have a look at your install instructions and see if maybe an environment variable needs to be set (maybe JAVA_HOME) Also, do a find and make sure that the executable does actually exist somewhere?? |
If you try:
Code:
#which java Basically you need to add the following to your bash_profile: Code:
export JAVA_HOME=/path/to/my/java/installation/ Having JAVA_HOME setup is also very useful in that your application servers and/or IDE will look for this variable. |
Thank you. Will try your suggestions and post feedback
|
The CentOS way : Something like this :
1) su 2) Code:
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_21/bin/java 2 (( 4) /usr/sbin/alternatives --config javac )) .. |
All times are GMT -5. The time now is 04:11 PM. |