Java version not found
Java command not found although java is installed
[root@server]# java -version
-bash: java: command not found
Check in /etc/bashrc file path of java is defined or not.If multiple application using java then define all path separated by colon.
vim /etc/bashrc
PATH=/usr/java/jdk1.6.0_45/bin
save and exit.
then run below command.
#source ~/.bashrc
Run below command where your java files are located.
[root@server]# export PATH=$PATH:/opt/java/jdk1.6.0_45/bin/
[root@server]# java -version
java version "1.6.0_45"
[root@server]# java -version
-bash: java: command not found
Check in /etc/bashrc file path of java is defined or not.If multiple application using java then define all path separated by colon.
vim /etc/bashrc
PATH=/usr/java/jdk1.6.0_45/bin
save and exit.
then run below command.
#source ~/.bashrc
Run below command where your java files are located.
[root@server]# export PATH=$PATH:/opt/java/jdk1.6.0_45/bin/
[root@server]# java -version
java version "1.6.0_45"
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home