centos 6.10 with java 1.6 and java 1.8
by sasaleh@nvcc.edu from LinuxQuestions.org on (#5C5TM)
I'm trying to install two versions of java on two different hosts. On one, it works. However on the second host, it fails.
Here is the host that works. Note, native java 1.6 is in the path, I run java 1.8 from the current folder.
[root@mail bin]# java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)
[root@mail bin]# ./java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) Server VM (build 25.271-b09, mixed mode)
Works great.
On another host, I try the same, and it fails. Note:
root@host-clone:/usr/lib/jvm java -version
java version "1.6.0_41"
OpenJDK Runtime Environment (IcedTea6 1.13.13) (rhel-1.13.13.1.el6_8-x86_64)
OpenJDK 64-Bit Server VM (build 23.41-b41, mixed mode)
root@host-clone:/usr/lib/jvm/jre1.8.0_271/bin ./java -version
-bash: ./java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
root@host-clone:/usr/lib/jvm/jre1.8.0_271/bin
I've googled the error, and get suggestions that there is a mixup between 32 and 64 bit versions of SW. However, I am not able to find the solution.
Any hints would be beneficial.
Thanks in advance.


Here is the host that works. Note, native java 1.6 is in the path, I run java 1.8 from the current folder.
[root@mail bin]# java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)
[root@mail bin]# ./java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) Server VM (build 25.271-b09, mixed mode)
Works great.
On another host, I try the same, and it fails. Note:
root@host-clone:/usr/lib/jvm java -version
java version "1.6.0_41"
OpenJDK Runtime Environment (IcedTea6 1.13.13) (rhel-1.13.13.1.el6_8-x86_64)
OpenJDK 64-Bit Server VM (build 23.41-b41, mixed mode)
root@host-clone:/usr/lib/jvm/jre1.8.0_271/bin ./java -version
-bash: ./java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
root@host-clone:/usr/lib/jvm/jre1.8.0_271/bin
I've googled the error, and get suggestions that there is a mixup between 32 and 64 bit versions of SW. However, I am not able to find the solution.
Any hints would be beneficial.
Thanks in advance.