在jar导出期间,manifest.mf被ecplise覆盖 [英] manifest.mf is overwritten by ecplise during jar export

查看:1256
本文介绍了在jar导出期间,manifest.mf被ecplise覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用eclipse做一个可执行的jar存档。
所以在我的项目中,我创建了文件src / META-INF / MANIFEST.MF:

 
清单版本:1.0
主类:MainClass
类路径:。

但是当我导出我的java eclipse项目eclipse会警告我有以下消息:



JAR导出完成并带有警告,查看详细信息。
myproject / src / META-INF / MANIFEST.MF被生成的MANIFEST.MF替换,不再在JAR中。



任何人都知道如何在eclipse导出项目时避免这种情况?

解决方案

导出jar时,选择使用现有清单的选项并浏览到项目的清单文件。生成的jar现在将显示该清单文件。



使用现有清单http://img46.imageshack.us/img46/6752/export.png


I would like make an executable jar archive with eclipse. So into my project I created file src/META-INF/MANIFEST.MF :

Manifest-Version: 1.0
Main-Class: MainClass
Class-Path: .

But when I export my java eclipse project eclipse warn me with following message:

"JAR export finished with warnings. See details for additional information. myproject/src/META-INF/MANIFEST.MF was replaced by the generated MANIFEST.MF and is no longer in the JAR."

Anyone know how I can avoid this when I export my project in eclipse?

解决方案

While exporting the jar, select the option to use existing manifest and browse to the manifest file of your project. The generated jar will have that manifest file now.

Using existing manifest http://img46.imageshack.us/img46/6752/export.png

这篇关于在jar导出期间,manifest.mf被ecplise覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆