0

The old version that i had was java 1.7.0_67 . To run a program i was obliged to install a new version 1.8.0_66. I installed it from here http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/# but when i came to the last step which is the verification of the version of java i found 1.7.0_67.

It means that the system is still working with the old version. I want to delete the old one and work with java 1.8.0_66 which is logically installed somewhere in the machine but not taken into consideration.

AVI
  • 5,516
  • 5
  • 29
  • 38
  • i forgot to mention that i'm working on Centos Redhat , linux – Dhouha Ben hamadou Dec 26 '15 at 10:39
  • if you delete the old version it doesn't mean that the new version will work, the system should be able to find a new version executable file to run your program. – Roman C Dec 26 '15 at 11:16
  • Okey, but what to do? when i type the command "which java" it gives me the path of the old version. I just want it to point to the path of the new version. Simple but i don't really know how to do this – Dhouha Ben hamadou Dec 26 '15 at 11:26

1 Answers1

0

You should create a symlink to the new version of java executable and put it into /usr/bin. The way is which command works is to find the first available path of the file defined by the system environment variable. The one I suggested to use is very popular among UNIX/Linux systems. You could provide the exact path to the java intolation folder. cd /usr/bin; ln -s /path/to/javasdk/bin/java java. If you like to know how to create a symlink, this post would be helpful How to symlink a file in Linux?.

Community
  • 1
  • 1
Roman C
  • 49,761
  • 33
  • 66
  • 176