打jar包遇到的问题

来源:互联网 发布:杭州城站离高铁站源码 编辑:程序博客网 时间:2024/04/29 06:03

使用eclipse打jar包注意事项:
1、选择需要打包的工程,只选中src。
   选中 Export generated class files and resources。
   选中 Compress the contents of the JAR file。
   选中 Overwrite existing files without warning。

2、选中 Export class files with compile warnings。

 

 

在你的项目文件夹下建一个META-INF文件夹里面新建一个
MANIFEST.MF的文件内容大至如下
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.5.0_06-57 ("Apple Computer, Inc.")
Built-By: hani
Main-Class: com.opensymphony.workflow.designer.Launcher
Class-Path: looks.jar forms.jar syntax.jar jgraph.jar foxtrot.jar osworkflow-2.8.0.jar oscore-2.2.5.jar

Main-Class就是你要运行的类。
Class-path:就是你要引入的包
用eclipse导出jar文件里,选择
user existing manifest from workspace
manifest file:/你的项目名/src/META-INF/MANIFEST.MF
点击完成。这样应该就可以了

 

 

原创粉丝点击