简体   繁体   English

Eclipse尝试导出到可运行的JAR时找不到主要方法

[英]Eclipse not finding main method when trying to export to runnable JAR

I am trying to include some external dependencies in my JAR file when I export from eclipse, so I'm using the "Runnable JAR" export option. 从eclipse导出时,我试图在我的JAR文件中包括一些外部依赖项,所以我使用的是“ Runnable JAR”导出选项。 But when I choose my configuration to export and click "Finish", I get these errors . 但是,当我选择导出配置并单击“完成”时, 出现这些错误 That configuration runs completely fine when I use Right Click > Run As on the class, and my main method is right here in the file I told Eclipse to look in. What could I be doing wrong when I export? 这种配置运行完全正常,当我用Right Click > Run As上的课,我的主要方法是在这里 ,我告诉Eclipse查找在文件中,又有什么会,当我出口我是做错了什么?

Here's my run configuration. 这是我的运行配置。

事实证明,JDK 9之后的最新Java版本会导致Eclipse出现某种问题,并且我能够在切换到JDK 8后导出。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM