Hi,
You can get this error when you are using the wrong JVM to compile (e.g using a 32 bit compiler to try and build 64 bit JVM code or vice versa). It's worth checking you're using the right JVM version for the code bitism you're trying to use.
Regards