http://blog.csdn.net/caiqcong/article/details/7618582
<spanstyle= "FONT-FAMILY:SIMSUN;FONT-SIZE:12PX;"><?XML version= "1.0" encoding= "UTF-8" standalone= "no"?><Projectdefault= "Create_run_jar"name= "Create Runnable Jar for Project SeleniumAutomation-3.1"> <!--This file is created by Eclipse Runnable JAR Export Wizard - <!--ANT 1.7 is required - <Targetname= "Create_run_jar"> <JarDestFile= "C:/users/topcat/desktop/111.jar"filesetmanifest= "Mergewithoutmain"> <Manifest> <attributename= "Main-class"value= "Com.safx.processor.Starter"/> <attributename= "Class-path"value="."/> </Manifest> <Filesetdir= "D:/seleniumautomation/safx-3.1/bin"/> <Zipfilesetexcludes= "meta-inf/*." SF "src= "D:/seleniumautomation/safx-3.1/lib/jaxen-1.1-beta-6.jar"/> <Zipfilesetexcludes= "meta-inf/*." SF "src= "D:/seleniumautomation/safx-3.1/lib/log4j-1.2.16.jar"/> <Zipfilesetexcludes= "meta-inf/*." SF "src= "D:/seleniumautomation/safx-3.1/lib/mail.jar"/> <Zipfilesetexcludes= "meta-inf/*." SF "src= "D:/seleniumautomation/safx-3.1/lib/testng-6.0.1.jar"/> <Zipfilesetexcludes= "meta-inf/*." SF "src= "D:/seleniumautomation/safx-3.1/lib/dom4j-1.6.1.jar"/> <Zipfilesetexcludes= "meta-inf/*." SF "src= "D:/seleniumautomation/safx-3.1/lib/guava-r09.jar"/> <Zipfilesetexcludes= "meta-inf/*." SF "src= "D:/seleniumautomation/safx-3.1/lib/jxl.jar"/> <Zipfilesetexcludes= "meta-inf/*." SF "src= "D:/seleniumautomation/safx-3.1/lib/selenium-java-2.21.0.jar"/> </Jar> </Target></Project></span>
Package a runnable jar file with Ant (Put the third-party jar package into your own jar package)