简体   繁体   English

Java - 即使 MANIFEST.MF 文件位于 /META-INF 中,App.jar 中也没有主要清单属性

[英]Java - No Main Manifest Attribute, in App.jar error even though MANIFEST.MF file is in /META-INF

I have been trying to get this to work, but it won't.我一直试图让这个工作,但它不会。 I went through the Archive Manager and found the MANIFEST.MF file in App.jar/META-INF/ so I don't know why it says there isn't one!我浏览了存档管理器并在App.jar/META-INF/中找到了MANIFEST.MF文件,所以我不知道为什么它说没有!

chmod -ing it with chmod +x./App.jar and running ./App.jar returns chmod - 使用chmod +x./App.jar并运行./App.jar返回

bash: ./App.jar: cannot execute binary file: Exec format error

Running Linux Mint 20 (Based on Ubuntu 20.04) With OpenJDK 11.使用 OpenJDK 11 运行 Linux Mint 20(基于 Ubuntu 20.04)。

Use java -jar App.jar to run the executable JAR file.使用java -jar App.jar运行可执行的 JAR 文件。

There is a way to make JAR files directly executable using the binfmt_misc kernel feature but most users/linux distributions don't bother to set it up.有一种方法可以使用binfmt_misc kernel 功能使 JAR 文件直接可执行,但大多数用户/Linux 发行版都懒得设置它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 jar文件中缺少主要属性,MANIFEST.MF文件位于META-INF文件夹中 - Missing main attribute inside the jar file, the MANIFEST.MF file is located in META-INF folder META-INF / MANIFEST.MF文件中的库依赖关系 - library dependencies in META-INF/MANIFEST.MF file 如何从* .war / META-INF / MANIFEST.MF文件中读取manifest.mf? - How to read manifest.mf from *.war/META-INF/MANIFEST.MF file? 对于 JIMAGE 文件,什么相当于 JAR 文件 META-INF/MANIFEST.MF? - What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file? 如何在Spring Boot应用程序中读取我的META-INF / MANIFEST.MF文件? - How to read my META-INF/MANIFEST.MF file in a Spring Boot app? 提取和重新创建的jar不支持“ META-INF / MANIFEST.MF”中的清单。 - Extracted and recreated jar does not honor manifest at `META-INF/MANIFEST.MF` Aws Lambda访问META-INF / MANIFEST.MF? - Aws Lambda access to META-INF/MANIFEST.MF? Java'找不到.jar的主类',即使它是用manifest.mf编写的 - Java 'Could not find main class' for .jar even though its written in manifest.mf 在unnamed.war中找不到META-INF / MANIFEST.MF文件 - META-INF/MANIFEST.MF file not found in unnamed.war 为什么喜欢/ WEB-INF / lib到/META-INF/MANIFEST.MF用于webapps? - Why prefer /WEB-INF/lib to /META-INF/MANIFEST.MF for webapps?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM