如何在 Eclipse 中使用其他外部 jar 依赖项创建不可运行/不可执行的 jar

Som*_*Som 5 java eclipse jar

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

Som*_*Som 3

非常感谢@kurellajunior 您的建议..它是通过使用 zipgroupfileset 解决下面是 ant 脚本,它完美地创建了我需要的 jar

<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>
Run Code Online (Sandbox Code Playgroud)