I think you may installed 32 bit jdk in 64 bit system.if your CentOs is 64 bit, and you installed 32 bit jdk. You will get that error when you run jar
you can check CentOs is 32 bit or 64 bit,enter command:
getconf LONG_BIT
If the CentOs is 64 bit, then you can remove the 32 bit jdk, and install a new one