Why has it failed to load main-class manifest attribute from a JAR file?

后端 未结 11 1457
不思量自难忘°
不思量自难忘° 2020-11-28 04:58

I have created a JAR file in this way jar cf jar-file input-files. Now, I\'m trying to run it. Running it does not work (jre command is not found):



        
11条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 05:22

    I faced the same problem. This unix command is not able to find the main class. This is because the runtime and compile time JDK versions are different. Make the jar through eclipse after changing the java compiler version. The following link helped me.

    http://crunchify.com/exception-in-thread-main-java-lang-unsupportedclassversionerror-comcrunchifymain-unsupported-major-minor-version-51-0/

    Try running the jar created after this step and then execute it

提交回复
热议问题