File page, locate the Build.xml file, open the </project> before adding the following code to save the
<target name= "Package-for-store" depends= "jar" > <!--Change the value of the of your jar, minus the. jar extension. It should not has spaces. <property name= "Store.jar.name" value= "Myjarname"/>---<property name= "Store.jar.name" value= "S Witchhexandchinese "/> <!--don ' t edit below this line-to <property name=" Store.dir "value=" stor E "/> <property name=" Store.jar "value=" ${store.dir}/${store.jar.name}.jar "/> <echo message=" Pack Aging ${application.title} to a single JAR at ${store.jar} "/> <delete dir=" ${store.dir} "/> <mk Dir dir= "${store.dir}"/> <jar destfile= "${store.dir}/temp_final.jar" filesetmanifest= "Skip" > &L T;zipgroupfileset dir= "Dist" includes= "*.jar"/> <zipgroupfileset dir= "dist/lib" includes= "*.jar"/> <manifest> <attribute NAMe= "Main-class" value= "${main.class}"/> </manifest> </jar> <zip destfile= "${sto Re.jar} "> <zipfileset src=" ${store.dir}/temp_final.jar "excludes=" meta-inf/*. SF, meta-inf/*. DSA, meta-inf/*. RSA "/> </zip> <delete file=" ${store.dir}/temp_final.jar "/> </target>
Build.xml right-click to package Build Switchhexandchinese.jar
The resulting file
Java hits a third-party jar package into the main program to form a runnable jar (RPM)