I typed in \"java -jar ShowTime.jar\", and got this error message:
Exception in thread \"main\" java.lang.ClassFormatError: Incompatible magic value 13470932
It means your application is using a jar file which is complied in a specific format in some other system. Now when you are trying to use the project in other system, the other system is not able to decode the jar, as each system generated a specific key to bundle the project.
Remote debug id the best way to find the issue that which jar is not in the proper format. Run the command in comment prompt for remote debug
java -agentlib:jdwp=transport=dt_socket,server=y,address=8001,suspend=n (command and parameter to run you jar)
what you need is, find the jar file and replace with another jar (may be a freshly downloaded one or if you teammate has the jar. Use it.)
The error i was getting because my project way having dependency with another project ABC, and ABC was using a generic jar. But project ABC was bundled with the magic key. I have replaced the jar used by ABC with a downloaded jar.
A Java class should start with the magic (hex) value 0xCAFEBABE
(neat huh). Your value 1347093252
is 0x504B0304
in hex, which happens to be the magic value for a ZIP file (first 2 bytes in ASCII are PK for Phil Katz, creator of the ZIP format). A jar is also a zipfile btw, so probably your jar is pretty much corrupt. Try rebuilding the entire project.
That usually means that you compiled the jar for a newer version of java than you ran it with. Check to see if you are using the same version of java to compile and run. If that doesn't fix the problem, please provide more info such as the compiler command and the output of java -version
.