jeudi 29 janvier 2015

java version not found in redhat


My OS is redhat linux. It's having the default java 1.4.2, but I need java 1.7.45, for that I am trying as follows:



/usr/sbin/alternatives --install /usr/bin/java java /u01/java7/bin/java 5
/usr/sbin/alternatives --install /usr/bin/java java /u01/java7/bin/java 2

/usr/sbin/alternatives --config java

Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
+ 2 /u01/java7/bin/java


Here i am selecting 2nd one


After that i am getting the message



[root@localhost bin]# java --version
bash: /usr/bin/java: cannot execute binary file


so please give me solution for resolving this problem in redhat linux



[root@localhost bin]# java --version
bash: /usr/bin/java: cannot execute binary file


Aucun commentaire:

Enregistrer un commentaire