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
If it is a standalone (Main method) java project then Not any specific path put all the jars inside the project not any specific path then right click on the project - > export - > Runnable jar --> Select the lunch configuration and Library handeling then choose the radio button option "Package required libraries into ...
You have selected the JRE System Library in the panel. Un-select that and you will be able to add external jars. You can click on the Classpath or Modulepath to move the control away.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With