Java failed after and update

view story

http://stackoverflow.com – I'm new in linux and i'm having a problem. I installed this java using #yum install java-1.6.0-openjdk and my application was running good and when I typed #which java I was receiving #/usr/bin/java But i think if i update will be good and i use #yum install java-1.7.0-openjdk After that i'm with problem, the application is not more recognizing the java and i already tried to erase ALL java installed using #yum erase java-1.6.0-openjdk and #yum erase java-1.7.0-openjdk And i tried again to intall using #yum install java-1.6.0-openjdk but when i type #which java I (HowTos)