"无法找到给定的启动配置&QUOT主要方法;从Eclipse的出口罐子时出错 [英] "Could not find main method from given launch configuration" error when exporting jar from Eclipse
问题描述
我公司开发使用Eclipse作为我的IDE我的计划。我用文件|导出|可运行的JAR文件
选项为客户创造DIST构建。
I developed my program using Eclipse as my IDE. I used to use File|Export| Runnable JAR file
option for creating dist build for client.
我是用运行或(经常)在eclipse调试按钮项目工作(所以我必须配置与有效的方法主要项目)。
I was working with project using Run or (often) Debug button in eclipse (so I have configuration for project with valid main method).
不幸的是,当我创建的构建昨天我下面的错误,当我试图运行的应用程序:
Unfortunately when I created build yesterday I had following error when I tried to run app:
Failed to load Main-Class manifest attribute from My.jar
后来,当我重试出口,我发现在导出日志以下问题:
Then when I retried exporting I found the following problem in export log:
Could not find main method from given launch configuration
我不知道什么可能导致此问题。我觉得我没有改变我的项目配置任何东西。而且我测试我的建立,所以我敢肯定,使用这个选项才能正常工作。
I have no idea what could cause this problem. I think I hadn't change anything in my project configuration. And I'm test my builds so I'm sure this option used to work correctly.
我将AP preciate任何帮助。
I will appreciate any help.
推荐答案
您在导出对话框中选择正确的启动配置?请确保它在你的项目。
Are you selecting correct 'Launch Configuration' in the export dialog? Make sure it's from your project.
此外,一旦出口可以解压缩jar文件,看看META-INF / MANIFEST.MF文件 - 应该有主类条目用你的类,其中main()方法是完全合格的名称。
Also, once exported you could unzip jar file and look into 'META-INF/MANIFEST.MF' file - there should be 'Main-Class' entry with fully qualified name of your class where the main() method is.
这篇关于"无法找到给定的启动配置&QUOT主要方法;从Eclipse的出口罐子时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!