[英]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.