Check that JAVA_HOME refers to a JDK or JRE of the same bitism as the current compilation mode. That is, if using cob32 (UNIX), or the 32-bit command prompt (Windows), JAVA_HOME must be 32 bit; if using cob64 (UNIX), or the 64-bit command prompt (Windows), JAVA_HOME must be 64 bit.