“ClassFormatError: Incompatible magic value” when trying to run Java jar file

后端 未结 3 1658
心在旅途
心在旅途 2020-12-18 03:43

I typed in \"java -jar ShowTime.jar\", and got this error message:

Exception in thread \"main\" java.lang.ClassFormatError: Incompatible magic value 13470932         


        
3条回答
  •  臣服心动
    2020-12-18 04:38

    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.

提交回复
热议问题