Java 无法使用Intellij生成JAR文件
我在路径Java 无法使用Intellij生成JAR文件,java,maven,intellij-idea,jar,Java,Maven,Intellij Idea,Jar,我在路径xxx/IdeaProjects/xxx/out/artifacts/abc\u jar中创建了一个jar 当我使用java-jar运行它时,我得到 Could not find or load main class ... 我已将mainfest文件移动到xxx/IdeaProjects/xxx/src/main/resources/META-INF/MANIFEST.MF 而主类是com.rh.xxx.Application,但仍然是 Could not find or load
xxx/IdeaProjects/xxx/out/artifacts/abc\u jar
中创建了一个jar
当我使用java-jar运行它时,我得到
Could not find or load main class ...
我已将mainfest文件移动到xxx/IdeaProjects/xxx/src/main/resources/META-INF/MANIFEST.MF
而主类是com.rh.xxx.Application
,但仍然是
Could not find or load main class...
使用完全限定的java类设置MANIFEST.MF文件中的Start Class属性值。创建jar后,在生成的jar文件中验证相同的内容 请参考下面,这里的初学者类是一个有主要方法 的内容,META-INF/MANIFEST.MF
Main-Class: org.springframework.boot.loader.JarLauncher
Start-Class: com.mycompany.project.MyApplication
有关更多信息,请参阅。有关示例,请参阅。MF不应该由intellij自己创建吗?