Usually the version error in java occurs due to a package being compiled in a higher version and being run on a lower version of java ( this is my understanding, please correct if I am wrong ) but I have the same version of java installed on 2 nodes but still getting a version error when the package is compiled on one of the nodes and run on another node. The jdk used for installation is "jdk-7u17-linux-i586.tar.gz". Both the machines are running 32-bit Linux(Ubuntu) OS.
Any idea why this could be happening ?
1 Answer 1
You can check for multiple installation of JRE/JDK.
update-java-alternatives -l
- Shows you all the Java versions you have installed.
java -showversion
- Shows you the java version you are using and help.
java -version
- Java Version only
java -versionon both machines and see if you have OpenJDK or GCJ installed.