如何在Eclipse中创建一个不可运行/不可执行的jar与其他外部jar依赖关系 [英] how to create a not runnable/not executable jar with other external jar dependencies in Eclipse

查看:168
本文介绍了如何在Eclipse中创建一个不可运行/不可执行的jar与其他外部jar依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法通过eclipse导出向导创建正常的jar(不可运行/不可执行),它只创建jar文件,但是从其他类调用导出的jar的方法时,不会导出依赖的jar导致错误,请帮助

I am unable to create normal jar (not runnable/not executable) through eclipse export wizard ,it only creates the jar file but the dependent jars are not exported resulting error while calling the methods of the exported jar from some other class , Please help

推荐答案

非常感谢您的建议@kurellajunior ..它是通过使用 zipgroupfileset 下面是根据需要完美创建jar的蚂蚁脚本

Thanks a lot @kurellajunior for your suggestion .. it's solved by using the zipgroupfileset . below is the ant script which perfectly creates the jar as I needed

<project default="jar">
    <target name="jar">
            <jar destfile="destination directory/jarFileName.jar" basedir="my Eclipse project folder/bin (which holds all the .class files of my project separated by different package folder) ">
            <zipgroupfileset dir="Location of my external jar file directory" includes="*.jar"/>
            </jar>
        </target>
    </project>

这篇关于如何在Eclipse中创建一个不可运行/不可执行的jar与其他外部jar依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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